Skip to content

Commit c555e4c

Browse files
committed
Apply rustfmt
1 parent 8ceb212 commit c555e4c

43 files changed

Lines changed: 273 additions & 212 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/allocate_bound.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use eyre::eyre;
22
use hwlocality::{
3-
memory::binding::{MemoryBindingFlags, MemoryBindingPolicy},
4-
object::{depth::Depth, TopologyObject},
53
Topology,
4+
memory::binding::{MemoryBindingFlags, MemoryBindingPolicy},
5+
object::{TopologyObject, depth::Depth},
66
};
77

88
/// Allocate 4 MiB of memory that is bound to the last NUMA node on the system

examples/bind_process_cpu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use eyre::eyre;
22
use hwlocality::{
3-
cpu::binding::CpuBindingFlags,
4-
object::{types::ObjectType, TopologyObject},
53
Topology,
4+
cpu::binding::CpuBindingFlags,
5+
object::{TopologyObject, types::ObjectType},
66
};
77

88
/// Example which binds an arbitrary process (in this example this very same one)

examples/bind_threads_cpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use eyre::eyre;
22
use hwlocality::{
3+
Topology,
34
cpu::binding::CpuBindingFlags,
45
object::types::ObjectType,
56
topology::support::{DiscoverySupport, FeatureSupport},
6-
Topology,
77
};
88

99
/// Example which spawns one thread per core and then assigns it to each.

examples/bind_to_last_core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use eyre::eyre;
22
use hwlocality::{
3-
cpu::binding::CpuBindingFlags,
4-
object::{types::ObjectType, TopologyObject},
53
Topology,
4+
cpu::binding::CpuBindingFlags,
5+
object::{TopologyObject, types::ObjectType},
66
};
77

88
/// Bind to the CPU last core of the machine.

examples/number_of_packages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use hwlocality::{
2-
object::{depth::TypeToDepthError, types::ObjectType},
32
Topology,
3+
object::{depth::TypeToDepthError, types::ObjectType},
44
};
55

66
/// Prints the number of packages.

examples/process_cpu_bindings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use std::collections::{BTreeMap, BTreeSet};
22

33
use hwlocality::{
4+
ProcessId, Topology,
45
cpu::{binding::CpuBindingFlags, cpuset::CpuSet},
56
topology::{
67
builder::BuildFlags,
78
support::{CpuBindingSupport, FeatureSupport},
89
},
9-
ProcessId, Topology,
1010
};
1111
use sysinfo::{ProcessRefreshKind, RefreshKind, System};
1212

examples/processor_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use eyre::eyre;
22
use hwlocality::{
3-
object::{attributes::ObjectAttributes, types::ObjectType},
43
Topology,
4+
object::{attributes::ObjectAttributes, types::ObjectType},
55
};
66

77
/// Compute the amount of cache that the first logical processor

examples/support.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use hwlocality::{
2-
topology::support::{CpuBindingSupport, FeatureSupport, MemoryBindingSupport},
32
Topology,
3+
topology::support::{CpuBindingSupport, FeatureSupport, MemoryBindingSupport},
44
};
55

66
/// Example on how to check for specific topology support of a feature.

examples/walk_linear.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use hwlocality::{object::depth::NormalDepth, Topology};
1+
use hwlocality::{Topology, object::depth::NormalDepth};
22

33
/// Walk the topology with an array style, from depth 0 (always Machine)
44
/// to the lowest depth (always logical processors).

examples/walk_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use hwlocality::{object::TopologyObject, Topology};
1+
use hwlocality::{Topology, object::TopologyObject};
22

33
/// Walk the topologylogy in a tree-style and print it.
44
fn main() -> eyre::Result<()> {

0 commit comments

Comments
 (0)