rust: Run rustfmt with some experimental options

+ Sort and group the imports
+ Normalize and format comments (100 characters width)

Command used:

$ cargo +nightly fmt --

Acked-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Marc Hartmayer <marc@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2026-05-11 14:43:53 +02:00
committed by Jan Höppner
parent 3d5f75d6c3
commit f8fb9ce32a
120 changed files with 825 additions and 900 deletions
+3 -3
View File
@@ -7,11 +7,11 @@ mod msa;
mod query;
mod stfle;
use anyhow::bail;
use anyhow::Result as anyhowRes;
use clap::Parser;
use std::io::ErrorKind;
use std::result::Result::Ok;
use anyhow::{bail, Result as anyhowRes};
use clap::Parser;
use utils::print_version;
use crate::cli::{Cli, Format};
+3 -1
View File
@@ -2,11 +2,13 @@
//
// Copyright IBM Corp. 2024
use crate::cli::Cli;
use core::fmt::{Display, Formatter, Result};
use serde::{Serialize, Serializer};
use utils::HexSlice;
use crate::cli::Cli;
/// Number of total function codes (0 to 127)
pub const NUMBER_FUNC_CODES: usize = 128;
+2 -4
View File
@@ -3,15 +3,13 @@
// Copyright IBM Corp. 2024
use std::fs::File;
use std::io::Error;
use std::io::Read;
use std::io::{Error, Read};
use std::ops::Index;
use std::result::Result;
use zerocopy::FromBytes;
use crate::msa::InstructionKind;
use crate::msa::QueryAuthInfo;
use crate::msa::{InstructionKind, QueryAuthInfo};
/// Path to sysfs in which the query and qai informations are fetched from
const SYSFS_PATH: &str = "/sys/devices/system/cpu/cpacf/";