Skip to content

Commit 2010bb8

Browse files
committed
Update rustfmt.toml to current edition and format
I think we were previously using an invalid value (note difference in capitalisation) for the `use_small_heuristics` value. This should fix that.
1 parent bec70c4 commit 2010bb8

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

acpi/src/mcfg.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use crate::{sdt::{SdtHeader, Signature}, AcpiTable};
1+
use crate::{
2+
sdt::{SdtHeader, Signature},
3+
AcpiTable,
4+
};
25
use core::{mem, slice};
36

47
/// Describes a set of regions of physical memory used to access the PCIe configuration space. A
@@ -58,8 +61,6 @@ where
5861
}
5962
}
6063

61-
62-
6364
/// Configuration entry describing a valid bus range for the given PCI segment group.
6465
pub struct PciConfigEntry {
6566
pub segment_group: u16,
@@ -104,7 +105,6 @@ unsafe impl AcpiTable for Mcfg {
104105
}
105106
}
106107

107-
108108
impl Mcfg {
109109
/// Returns a slice containing each of the entries in the MCFG table. Where possible, `PlatformInfo.interrupt_model` should
110110
/// be enumerated instead.

aml/src/namespace.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ impl Namespace {
163163
&mut self,
164164
path: AmlName,
165165
scope: &AmlName,
166-
target: AmlName
166+
target: AmlName,
167167
) -> Result<AmlHandle, AmlError> {
168168
let path = path.resolve(scope)?;
169169
let target = target.resolve(scope)?;
170170

171171
let handle = self.get_handle(&target)?;
172-
172+
173173
let (level, last_seg) = self.get_level_for_path_mut(&path)?;
174174
match level.values.insert(last_seg, handle) {
175175
None => Ok(handle),
@@ -748,20 +748,20 @@ mod tests {
748748

749749
assert_eq!(namespace.add_level((AmlName::from_str("\\FOO")).unwrap(), LevelType::Scope), Ok(()));
750750

751-
assert!(
752-
namespace.add_value_at_resolved_path(
753-
AmlName::from_str("BAR").unwrap(),
754-
&AmlName::from_str("\\FOO").unwrap(),
755-
AmlValue::Integer(100))
756-
.is_ok()
757-
);
758-
assert!(
759-
namespace.add_alias_at_resolved_path(
751+
assert!(namespace
752+
.add_value_at_resolved_path(
753+
AmlName::from_str("BAR").unwrap(),
754+
&AmlName::from_str("\\FOO").unwrap(),
755+
AmlValue::Integer(100)
756+
)
757+
.is_ok());
758+
assert!(namespace
759+
.add_alias_at_resolved_path(
760760
AmlName::from_str("BARA").unwrap(),
761761
&AmlName::from_str("\\FOO").unwrap(),
762-
AmlName::from_str("BAR").unwrap())
763-
.is_ok()
764-
);
762+
AmlName::from_str("BAR").unwrap()
763+
)
764+
.is_ok());
765765
assert!(namespace.get_by_path(&AmlName::from_str("\\FOO.BARA").unwrap()).is_ok());
766766
assert_eq!(
767767
namespace.get_handle(&AmlName::from_str("\\FOO.BARA").unwrap()),

aml/src/term_object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ where
868868
if let Ok((_name, _handle)) = handle {
869869
match target {
870870
Target::Null => { /* just return the result of the check */ }
871-
_ => {return (Err(Propagate::Err(AmlError::Unimplemented)), context) },
871+
_ => return (Err(Propagate::Err(AmlError::Unimplemented)), context),
872872
}
873873
}
874874
(Ok(result), context)

rustfmt.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
unstable_features = true
2-
edition = "2018"
2+
edition = "2021"
33

44
imports_granularity='Crate'
55
imports_layout = "HorizontalVertical"
66
use_field_init_shorthand = true
77
use_try_shorthand = true
88
format_code_in_doc_comments = true
99
max_width = 115
10-
use_small_heuristics = "max"
10+
use_small_heuristics = "Max"

0 commit comments

Comments
 (0)