Skip to content

Commit 22a5b45

Browse files
JonathanWoollett-LightJonathan Woollett-Light
authored andcommitted
refactor: Import std::path::PathBuf
Imports `std::path::PathBuf` to avoid writing the full path in multiple places. Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
1 parent 2d3770a commit 22a5b45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vmm/src/vmm_config/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::convert::{From, TryInto};
66
use std::fs::{File, OpenOptions};
77
use std::io::{self, BufWriter, LineWriter, Write};
88
use std::os::unix::fs::OpenOptionsExt;
9-
use std::path::Path;
9+
use std::path::{Path, PathBuf};
1010
use std::str::FromStr;
1111
use std::sync::Mutex;
1212

@@ -270,7 +270,7 @@ impl FromStr for Level {
270270
#[serde(deny_unknown_fields)]
271271
pub struct LoggerConfig {
272272
/// Named pipe or file used as output for logs.
273-
pub log_path: std::path::PathBuf,
273+
pub log_path: PathBuf,
274274
/// The level of the Logger.
275275
pub level: Option<Level>,
276276
/// When enabled, the logger will append to the output the severity of the log entry.
@@ -280,7 +280,7 @@ pub struct LoggerConfig {
280280
/// Use the new logger format.
281281
pub new_format: Option<bool>,
282282
/// The profile file to output.
283-
pub profile_file: Option<std::path::PathBuf>,
283+
pub profile_file: Option<PathBuf>,
284284
}
285285

286286
/// Error with actions on the `LoggerConfig`.
@@ -378,7 +378,7 @@ fn old_log<S: Subscriber + for<'span> LookupSpan<'span>>(
378378
}
379379

380380
fn flame<S: Subscriber + for<'span> LookupSpan<'span>>(
381-
profile_file: &std::path::PathBuf,
381+
profile_file: &PathBuf,
382382
) -> FlameLayer<S, BufWriter<File>> {
383383
// We can discard the flush guard as
384384
// > This type is only needed when using

0 commit comments

Comments
 (0)