Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 16 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ anyhow = "1.0.98"
thiserror = "2.0.12"
tera = "1"
serde_json = "1.0.140"
toml = "0.8.20"
toml = "0.9.0"
shell-words = "1.1.0"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ pub fn enable_forward_ssh_agent(
command: DockerCommandBuilder,
agent_socket: &OsStr,
) -> DockerCommandBuilder {
debug!("Got SSH_AUTH_SOCK={:?}", agent_socket);
debug!("Got SSH_AUTH_SOCK={agent_socket:?}");
let dir = path::Path::new(agent_socket).to_path_buf();
command
.add_environment("SSH_AUTH_SOCK", agent_socket)
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl FlokiConfig {
}

pub fn from_file(file: &Path) -> Result<Self, FlokiError> {
debug!("Reading configuration file: {:?}", file);
debug!("Reading configuration file: {file:?}");

// Render the output from the configuration file before parsing.
let output = Self::render(file)?;
Expand Down
4 changes: 2 additions & 2 deletions src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl User {
fn current() -> Self {
let uid = nix::unistd::getuid();
let gid = nix::unistd::getgid();
debug!("Current user has uid {} and group {}", uid, gid);
debug!("Current user has uid {uid} and group {gid}");
Self { uid, gid }
}
}
Expand Down Expand Up @@ -109,7 +109,7 @@ fn resolve_floki_root_and_config(

/// Resolve a directory for floki to use for user-global file (caches etc)
fn get_floki_work_path(uid: nix::unistd::Uid) -> path::PathBuf {
let root: path::PathBuf = env::var("HOME").unwrap_or(format!("/tmp/{}/", uid)).into();
let root: path::PathBuf = env::var("HOME").unwrap_or(format!("/tmp/{uid}/")).into();
root.join(".floki")
}

Expand Down
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub enum FlokiError {
/// Generate a summary string for a process exiting
fn exit_code_diagnosis(exit_status: &ExitStatus) -> String {
match exit_status.code() {
Some(rc) => format!("exited with return code {}", rc),
Some(rc) => format!("exited with return code {rc}"),
None => "terminated by a signal".to_string(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Image {

/// Wrapper to pull an image by it's name
pub fn pull_image(name: &str) -> Result<(), Error> {
debug!("Pulling image: {}", name);
debug!("Pulling image: {name}");
let exit_status = Command::new("docker")
.arg("pull")
.arg(name)
Expand All @@ -168,7 +168,7 @@ pub fn pull_image(name: &str) -> Result<(), Error> {

/// Determine whether an image exists locally
pub fn image_exists_locally(name: &str) -> Result<bool, Error> {
debug!("Checking for image: {}", name);
debug!("Checking for image: {name}");
let ret = Command::new("docker")
.args(["history", name])
.stdin(Stdio::null())
Expand Down
2 changes: 1 addition & 1 deletion src/interpret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub(crate) fn run_floki_container(
}

if let Some(entrypoint) = &spec.entrypoint {
cmd = cmd.add_docker_switch(format!("--entrypoint={}", entrypoint))
cmd = cmd.add_docker_switch(format!("--entrypoint={entrypoint}"))
}

for switch in &spec.docker_switches {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn main() -> Result<(), Error> {
match run_floki_from_args(&args) {
Ok(()) => (),
Err(e) => {
error!("A problem occurred: {}", e);
error!("A problem occurred: {e}");
std::process::exit(1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl FlokiSpec {
paths,
};

debug!("built spec from config and environment: {:?}", spec);
debug!("built spec from config and environment: {spec:?}");

Ok(spec)
}
Expand Down
Loading