Skip to content

Commit 87acdef

Browse files
committed
Apply clippy suggestions
1 parent df92c33 commit 87acdef

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/commands/cmd_start.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,7 @@ asroot chown "$USER:$USER" {0}
406406
}
407407

408408
// remove pre-init flag to start initalization
409-
ctx.engine
410-
.exec(id, &vec!["rm", crate::FLAG_FILE_PRE_INIT])?;
409+
ctx.engine.exec(id, &["rm", crate::FLAG_FILE_PRE_INIT])?;
411410

412411
log::trace!("Waiting for container initialization");
413412

src/commands/cmd_start/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub fn find_terminfo() -> Vec<String> {
8080
}
8181

8282
// use TERMINFO_DIRS if defined
83-
if let Some(env_dirs) = std::env::var("TERMINFO_DIRS").ok() {
83+
if let Ok(env_dirs) = std::env::var("TERMINFO_DIRS") {
8484
log::debug!("Looking for terminfo directories from environment variable");
8585

8686
// filter existing directories

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ impl TryInto<Config> for ConfigFile {
3030

3131
fn try_into(self) -> std::result::Result<Config, Self::Error> {
3232
match self {
33-
Self::V01(x) => Ok(x.try_into()?),
33+
Self::V01(x) => Ok(x),
3434
}
3535
}
3636
}
3737

3838
impl ConfigFile {
3939
pub fn config_from_str(input: &str) -> Result<Config> {
40-
Ok(toml::from_str::<ConfigFile>(input)?.try_into()?)
40+
toml::from_str::<ConfigFile>(input)?.try_into()
4141
}
4242

4343
pub fn config_from_file(file: &Path) -> Result<Config> {

0 commit comments

Comments
 (0)