Skip to content

Commit 1834022

Browse files
committed
cargo +nightly fmt -- --config imports_granularity=Module,group_imports=StdExternalCrate
1 parent f089be4 commit 1834022

File tree

9 files changed

+22
-26
lines changed

9 files changed

+22
-26
lines changed

etw-reader/src/etw_types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use std::cell::OnceCell;
12
use std::ops::Deref;
23
use std::rc::Rc;
3-
use std::cell::OnceCell;
44

55
use rustc_hash::FxHashMap;
66
use windows::core::{GUID, PCWSTR};

etw-reader/src/lib.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
use std::borrow::Cow;
2+
use std::mem;
3+
use std::path::Path;
4+
15
use memoffset::offset_of;
26
pub use windows::core::GUID;
37
use windows::core::{h, HSTRING, PWSTR};
@@ -11,10 +15,6 @@ use windows::Win32::System::Diagnostics::Etw::{
1115
TRACE_PROVIDER_INSTANCE_INFO,
1216
};
1317

14-
use std::borrow::Cow;
15-
use std::mem;
16-
use std::path::Path;
17-
1818
// typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
1919
pub(crate) type TraceHandle = u64;
2020
pub const INVALID_TRACE_HANDLE: TraceHandle = u64::MAX;
@@ -37,8 +37,7 @@ pub mod utils;
3737
use etw_types::EventRecord;
3838
use parser::{Parser, ParserError, TryParse};
3939
use schema::SchemaLocator;
40-
use tdh_types::{PrimitiveDesc, PropertyDesc, TdhInType};
41-
use tdh_types::{Property, TdhOutType};
40+
use tdh_types::{PrimitiveDesc, Property, PropertyDesc, TdhInType, TdhOutType};
4241
use traits::EncodeUtf16;
4342

4443
#[repr(C)]

etw-reader/src/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ impl TryParse<f32> for Parser<'_> {
465465
///
466466
/// # Arguments
467467
/// * `name` - Name of the property to be found in the Schema
468-
468+
///
469469
/// # Example
470470
/// ```rust
471471
/// let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {

etw-reader/src/schema.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//! ETW Event Schema locator and handler
22
//!
33
//! This module contains the means needed to locate and interact with the Schema of an ETW event
4+
use std::cell::OnceCell;
45
use std::collections::hash_map::Entry;
56
use std::rc::Rc;
6-
use std::cell::OnceCell;
77

8+
use rustc_hash::FxHashMap;
89
use windows::core::GUID;
910
use windows::Win32::System::Diagnostics::Etw::{self, EVENT_HEADER_FLAG_64_BIT_HEADER};
10-
use rustc_hash::FxHashMap;
1111

1212
use super::etw_types::{DecodingSource, EventRecord, TraceEventInfoRaw};
1313
use super::property::PropertyIter;

fxprof-processed-profile/src/category.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ use std::hash::Hash;
33
use indexmap::Equivalent;
44
use serde::ser::{Serialize, SerializeMap, Serializer};
55

6-
use crate::Profile;
7-
86
use super::category_color::CategoryColor;
97
use super::fast_hash_map::FastIndexSet;
8+
use crate::Profile;
109

1110
/// Implemented by [`Category`], [`Subcategory`], [`CategoryHandle`] and [`SubcategoryHandle`].
1211
pub trait IntoSubcategoryHandle {

samply/src/linux_shared/vdso.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
use object::Object;
21
use std::sync::OnceLock;
2+
3+
use object::Object;
34
use wholesym::{CodeId, ElfBuildId};
45

56
/// Returns the memory address range in this process where the VDSO is mapped.

samply/src/windows/coreclr.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ use num_derive::FromPrimitive;
88
use num_traits::FromPrimitive;
99

1010
use super::elevated_helper::ElevatedRecordingProps;
11-
use crate::shared::recording_props::{CoreClrProfileProps, ProfileCreationProps};
12-
use crate::windows::profile_context::ProfileContext;
13-
1411
use super::etw_reader::event_properties_to_string;
1512
use super::etw_reader::parser::{Parser, TryParse};
1613
use super::etw_reader::schema::TypedEvent;
14+
use crate::shared::recording_props::{CoreClrProfileProps, ProfileCreationProps};
15+
use crate::windows::profile_context::ProfileContext;
1716

1817
const CORE_CLR_GC_CATEGORY: Category<'static> = Category("CoreCLR GC", CategoryColor::Red);
1918

samply/src/windows/etw_gecko.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ use fxprof_processed_profile::debugid;
77
use uuid::Uuid;
88

99
use super::coreclr::CoreClrContext;
10-
use super::profile_context::ProfileContext;
11-
use crate::windows::coreclr;
12-
use crate::windows::profile_context::PeInfo;
13-
1410
use super::etw_reader::parser::{Address, Parser, TryParse};
1511
use super::etw_reader::schema::SchemaLocator;
1612
use super::etw_reader::{
1713
add_custom_schemas, event_properties_to_string, open_trace, print_property, GUID,
1814
};
15+
use super::profile_context::ProfileContext;
16+
use crate::windows::coreclr;
17+
use crate::windows::profile_context::PeInfo;
1918

2019
pub fn process_etl_files(
2120
context: &mut ProfileContext,

samply/src/windows/etw_reader/mod.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
use std::borrow::Cow;
2+
use std::mem;
3+
use std::path::Path;
4+
15
use memoffset::offset_of;
26
pub use windows::core::GUID;
37
use windows::core::{h, HSTRING, PWSTR};
@@ -11,10 +15,6 @@ use windows::Win32::System::Diagnostics::Etw::{
1115
TRACE_PROVIDER_INSTANCE_INFO,
1216
};
1317

14-
use std::borrow::Cow;
15-
use std::mem;
16-
use std::path::Path;
17-
1818
// typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
1919
pub(crate) type TraceHandle = u64;
2020
pub const INVALID_TRACE_HANDLE: TraceHandle = u64::MAX;
@@ -37,8 +37,7 @@ pub mod utils;
3737
use etw_types::EventRecord;
3838
use parser::{Parser, ParserError, TryParse};
3939
use schema::SchemaLocator;
40-
use tdh_types::{PrimitiveDesc, PropertyDesc, TdhInType};
41-
use tdh_types::{Property, TdhOutType};
40+
use tdh_types::{PrimitiveDesc, Property, PropertyDesc, TdhInType, TdhOutType};
4241
use traits::EncodeUtf16;
4342

4443
#[repr(C)]

0 commit comments

Comments
 (0)