File tree Expand file tree Collapse file tree 4 files changed +5
-8
lines changed Expand file tree Collapse file tree 4 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ fn main() {
8
8
let out_dir = env:: var_os ( "OUT_DIR" ) . unwrap ( ) ;
9
9
let dest_path = Path :: new ( & out_dir) . join ( "version.rs" ) ;
10
10
fs:: write (
11
- & dest_path,
11
+ dest_path,
12
12
"
13
13
#[allow(dead_code)]
14
14
#[allow(clippy::all)]
Original file line number Diff line number Diff line change @@ -395,7 +395,7 @@ pub(crate) fn fixup_etc_fstab(root: &Dir) -> Result<()> {
395
395
// Returns Ok(true) if we made a change (and we wrote the modified line)
396
396
// otherwise returns Ok(false) and the caller should write the original line.
397
397
fn edit_fstab_line ( line : & str , mut w : impl Write ) -> Result < bool > {
398
- if line. starts_with ( "#" ) {
398
+ if line. starts_with ( '#' ) {
399
399
return Ok ( false ) ;
400
400
}
401
401
let parts = line. split_ascii_whitespace ( ) . collect :: < Vec < _ > > ( ) ;
Original file line number Diff line number Diff line change @@ -1245,11 +1245,8 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
1245
1245
// At this point, all other threads should be gone.
1246
1246
if let Some ( state) = Arc :: into_inner ( state) {
1247
1247
// If we had invoked `setenforce 0`, then let's re-enable it.
1248
- match state. selinux_state {
1249
- SELinuxFinalState :: Enabled ( Some ( guard) ) => {
1250
- guard. consume ( ) ?;
1251
- }
1252
- _ => { }
1248
+ if let SELinuxFinalState :: Enabled ( Some ( guard) ) = state. selinux_state {
1249
+ guard. consume ( ) ?;
1253
1250
}
1254
1251
} else {
1255
1252
// This shouldn't happen...but we will make it not fatal right now
Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ pub(crate) fn ensure_dir_labeled(
347
347
let as_path = as_path
348
348
. map ( Cow :: Borrowed )
349
349
. unwrap_or_else ( || Utf8Path :: new ( "/" ) . join ( destname) . into ( ) ) ;
350
- require_label ( policy, & * as_path, libc:: S_IFDIR | mode. as_raw_mode ( ) )
350
+ require_label ( policy, & as_path, libc:: S_IFDIR | mode. as_raw_mode ( ) )
351
351
} )
352
352
. transpose ( )
353
353
. with_context ( || format ! ( "Labeling {local_destname}" ) ) ?;
You can’t perform that action at this time.
0 commit comments