Skip to content

Commit 8b3365a

Browse files
authored
Merge pull request #502 from Metaswitch/renovate/all-minor-patch
Update Rust crate toml to 0.9.0
2 parents ffcd85d + f189679 commit 8b3365a

10 files changed

Lines changed: 27 additions & 32 deletions

File tree

Cargo.lock

Lines changed: 16 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ anyhow = "1.0.98"
3030
thiserror = "2.0.12"
3131
tera = "1"
3232
serde_json = "1.0.140"
33-
toml = "0.8.20"
33+
toml = "0.9.0"
3434
shell-words = "1.1.0"
3535

3636
[dev-dependencies]

src/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ pub fn enable_forward_ssh_agent(
191191
command: DockerCommandBuilder,
192192
agent_socket: &OsStr,
193193
) -> DockerCommandBuilder {
194-
debug!("Got SSH_AUTH_SOCK={:?}", agent_socket);
194+
debug!("Got SSH_AUTH_SOCK={agent_socket:?}");
195195
let dir = path::Path::new(agent_socket).to_path_buf();
196196
command
197197
.add_environment("SSH_AUTH_SOCK", agent_socket)

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl FlokiConfig {
210210
}
211211

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

215215
// Render the output from the configuration file before parsing.
216216
let output = Self::render(file)?;

src/environment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl User {
1818
fn current() -> Self {
1919
let uid = nix::unistd::getuid();
2020
let gid = nix::unistd::getgid();
21-
debug!("Current user has uid {} and group {}", uid, gid);
21+
debug!("Current user has uid {uid} and group {gid}");
2222
Self { uid, gid }
2323
}
2424
}
@@ -109,7 +109,7 @@ fn resolve_floki_root_and_config(
109109

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

src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub enum FlokiError {
7878
/// Generate a summary string for a process exiting
7979
fn exit_code_diagnosis(exit_status: &ExitStatus) -> String {
8080
match exit_status.code() {
81-
Some(rc) => format!("exited with return code {}", rc),
81+
Some(rc) => format!("exited with return code {rc}"),
8282
None => "terminated by a signal".to_string(),
8383
}
8484
}

src/image.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl Image {
145145

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

169169
/// Determine whether an image exists locally
170170
pub fn image_exists_locally(name: &str) -> Result<bool, Error> {
171-
debug!("Checking for image: {}", name);
171+
debug!("Checking for image: {name}");
172172
let ret = Command::new("docker")
173173
.args(["history", name])
174174
.stdin(Stdio::null())

src/interpret.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub(crate) fn run_floki_container(
3737
}
3838

3939
if let Some(entrypoint) = &spec.entrypoint {
40-
cmd = cmd.add_docker_switch(format!("--entrypoint={}", entrypoint))
40+
cmd = cmd.add_docker_switch(format!("--entrypoint={entrypoint}"))
4141
}
4242

4343
for switch in &spec.docker_switches {

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn main() -> Result<(), Error> {
2727
match run_floki_from_args(&args) {
2828
Ok(()) => (),
2929
Err(e) => {
30-
error!("A problem occurred: {}", e);
30+
error!("A problem occurred: {e}");
3131
std::process::exit(1);
3232
}
3333
}

src/spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl FlokiSpec {
133133
paths,
134134
};
135135

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

138138
Ok(spec)
139139
}

0 commit comments

Comments
 (0)