Skip to content

Commit 54abf86

Browse files
authored
Merge pull request #642 from cgwalters/rustfmt
tree-wide: rustfmt with `group_imports = "StdExternalCrate"`
2 parents e1caed6 + 5a03760 commit 54abf86

File tree

8 files changed

+26
-24
lines changed

8 files changed

+26
-24
lines changed

lib/src/blockdev.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
use crate::install::run_in_host_mountns;
2-
use crate::task::Task;
3-
use anyhow::{anyhow, Context, Result};
4-
use camino::{Utf8Path, Utf8PathBuf};
5-
use fn_error_context::context;
6-
use nix::errno::Errno;
7-
use regex::Regex;
8-
use serde::Deserialize;
91
use std::collections::HashMap;
102
use std::env;
113
use std::fs::File;
@@ -14,6 +6,16 @@ use std::path::Path;
146
use std::process::Command;
157
use std::sync::OnceLock;
168

9+
use anyhow::{anyhow, Context, Result};
10+
use camino::{Utf8Path, Utf8PathBuf};
11+
use fn_error_context::context;
12+
use nix::errno::Errno;
13+
use regex::Regex;
14+
use serde::Deserialize;
15+
16+
use crate::install::run_in_host_mountns;
17+
use crate::task::Task;
18+
1719
#[derive(Debug, Deserialize)]
1820
struct DevicesOutput {
1921
blockdevices: Vec<Device>,

lib/src/cli.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
//!
33
//! Command line tool to manage bootable ostree-based containers.
44
5+
use std::ffi::OsString;
6+
use std::io::Seek;
7+
use std::os::unix::process::CommandExt;
8+
use std::process::Command;
9+
510
use anyhow::{Context, Result};
611
use camino::Utf8PathBuf;
712
use cap_std_ext::cap_std;
@@ -13,10 +18,6 @@ use ostree_container::store::PrepareResult;
1318
use ostree_ext::container as ostree_container;
1419
use ostree_ext::keyfileext::KeyFileExt;
1520
use ostree_ext::ostree;
16-
use std::ffi::OsString;
17-
use std::io::Seek;
18-
use std::os::unix::process::CommandExt;
19-
use std::process::Command;
2021

2122
use crate::deploy::RequiredHostSpec;
2223
use crate::lints;

lib/src/deploy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::io::{BufRead, Write};
66

77
use anyhow::Ok;
88
use anyhow::{anyhow, Context, Result};
9-
109
use cap_std::fs::{Dir, MetadataExt};
1110
use cap_std_ext::cap_std;
1211
use cap_std_ext::dirext::CapStdExtDirExt;

lib/src/docgen.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0 OR MIT
44

5+
use std::fs::OpenOptions;
6+
use std::io::Write;
7+
58
use anyhow::{Context, Result};
69
use camino::Utf8Path;
710
use clap::{Command, CommandFactory};
8-
use std::fs::OpenOptions;
9-
use std::io::Write;
1011

1112
pub fn generate_manpages(directory: &Utf8Path) -> Result<()> {
1213
generate_one(directory, crate::cli::Opt::command())

lib/src/install.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ use cap_std_ext::cap_std;
2828
use cap_std_ext::prelude::CapStdExtDirExt;
2929
use chrono::prelude::*;
3030
use clap::ValueEnum;
31-
use ostree_ext::oci_spec;
32-
use rustix::fs::{FileTypeExt, MetadataExt as _};
33-
3431
use fn_error_context::context;
3532
use ostree::gio;
3633
use ostree_ext::container as ostree_container;
34+
use ostree_ext::oci_spec;
3735
use ostree_ext::ostree;
3836
use ostree_ext::prelude::Cast;
37+
use rustix::fs::{FileTypeExt, MetadataExt as _};
3938
use serde::{Deserialize, Serialize};
4039

4140
use self::baseline::InstallBlockDeviceOpts;

lib/src/kargs.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
use anyhow::Ok;
22
use anyhow::Result;
3-
4-
use crate::deploy::ImageState;
53
use ostree::gio;
64
use ostree_ext::ostree;
75
use ostree_ext::ostree::Deployment;
86
use ostree_ext::prelude::Cast;
97
use ostree_ext::prelude::FileEnumeratorExt;
108
use ostree_ext::prelude::FileExt;
11-
129
use serde::Deserialize;
1310

11+
use crate::deploy::ImageState;
12+
1413
#[derive(Deserialize)]
1514
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
1615
struct Config {

lib/src/lsm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#[cfg(feature = "install")]
22
use std::io::Write;
3+
use std::os::fd::AsRawFd;
34
use std::os::unix::process::CommandExt;
45
use std::path::Path;
56
use std::process::Command;
@@ -17,7 +18,6 @@ use gvariant::{aligned_bytes::TryAsAligned, Marker, Structure};
1718
use ostree_ext::gio;
1819
use ostree_ext::ostree;
1920
use rustix::fd::AsFd;
20-
use std::os::fd::AsRawFd;
2121

2222
/// The mount path for selinux
2323
#[cfg(feature = "install")]

lib/src/status.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use std::collections::VecDeque;
22

3-
use crate::spec::{BootEntry, BootOrder, Host, HostSpec, HostStatus, HostType, ImageStatus};
4-
use crate::spec::{ImageReference, ImageSignature};
53
use anyhow::{Context, Result};
64
use camino::Utf8Path;
75
use fn_error_context::context;
@@ -14,6 +12,9 @@ use ostree_ext::oci_spec::image::ImageConfiguration;
1412
use ostree_ext::ostree;
1513
use ostree_ext::sysroot::SysrootLock;
1614

15+
use crate::spec::{BootEntry, BootOrder, Host, HostSpec, HostStatus, HostType, ImageStatus};
16+
use crate::spec::{ImageReference, ImageSignature};
17+
1718
impl From<ostree_container::SignatureSource> for ImageSignature {
1819
fn from(sig: ostree_container::SignatureSource) -> Self {
1920
use ostree_container::SignatureSource;

0 commit comments

Comments
 (0)