From 7e4c1e14d3535b0e1f24e3fd6b3e3220024b6417 Mon Sep 17 00:00:00 2001 From: Tait Hoyem Date: Thu, 27 Jun 2024 21:40:08 -0600 Subject: [PATCH] Using a struct in a doc item is not considered 'using' it --- atspi-common/src/events/document.rs | 12 ++++----- atspi-common/src/events/focus.rs | 2 +- atspi-common/src/events/object.rs | 42 ++++++++++++++--------------- atspi-common/src/events/terminal.rs | 10 +++---- atspi-common/src/events/window.rs | 22 +++++++-------- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/atspi-common/src/events/document.rs b/atspi-common/src/events/document.rs index 66053754..bb92a9d8 100644 --- a/atspi-common/src/events/document.rs +++ b/atspi-common/src/events/document.rs @@ -104,7 +104,7 @@ impl HasMatchRule for DocumentEvents { /// `LibreOffice` has loaded a document from disk. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct LoadCompleteEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -112,7 +112,7 @@ pub struct LoadCompleteEvent { /// For example: pressing F5, or `Control + r` will reload a page in a web browser. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ReloadEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -120,19 +120,19 @@ pub struct ReloadEvent { /// For example: during the loading of a large web page, a user may press `Escape` to stop loading the page. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct LoadStoppedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ContentChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct AttributesChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -145,7 +145,7 @@ pub struct AttributesChangedEvent { /// page number. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct PageChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } diff --git a/atspi-common/src/events/focus.rs b/atspi-common/src/events/focus.rs index 45369774..4e4e9a9c 100644 --- a/atspi-common/src/events/focus.rs +++ b/atspi-common/src/events/focus.rs @@ -61,7 +61,7 @@ impl HasMatchRule for FocusEvents { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct FocusEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } diff --git a/atspi-common/src/events/object.rs b/atspi-common/src/events/object.rs index bd35fa2e..2404366a 100644 --- a/atspi-common/src/events/object.rs +++ b/atspi-common/src/events/object.rs @@ -232,7 +232,7 @@ impl HasMatchRule for ObjectEvents { /// The `org.a11y.atspi.Event.Object:PropertyChange` event. #[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] pub struct PropertyChangeEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, // TODO: this is not necessary since the string is encoded in the `Property` type. pub property: String, @@ -257,7 +257,7 @@ impl Default for PropertyChangeEvent { } } -/// Any accessibility related property on an [`ObjectRef`]. +/// Any accessibility related property on an [`crate::ObjectRef`]. /// This is used only in the [`PropertyChangeEvent`]; this event gets triggered if a role or accessible /// description of an item changes. #[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)] @@ -404,21 +404,21 @@ impl From for OwnedValue { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct BoundsChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct LinkSelectedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } /// A state of an object has been modified. -/// A [`State`] can be added or removed from any [`ObjectRef`]. +/// A [`State`] can be added or removed from any [`crate::ObjectRef`]. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct StateChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, /// The state to be enabled/disabled. pub state: State, @@ -451,10 +451,10 @@ mod i32_bool_conversion { } } -/// A child of an [`ObjectRef`] has been added or removed. +/// A child of an [`crate::ObjectRef`] has been added or removed. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ChildrenChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, /// The [`crate::Operation`] being performed. pub operation: crate::Operation, @@ -466,32 +466,32 @@ pub struct ChildrenChangedEvent { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct VisibleDataChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct SelectionChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ModelChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ActiveDescendantChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, pub child: ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct AnnouncementEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, /// Text of the announcement. pub text: String, @@ -501,7 +501,7 @@ pub struct AnnouncementEvent { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct AttributesChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -549,20 +549,20 @@ pub struct ColumnDeletedEvent { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct TextBoundsChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct TextSelectionChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } -/// Text has changed within an [`ObjectRef`]. +/// Text has changed within an [`crate::ObjectRef`]. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct TextChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, /// The [`crate::Operation`] being performed. pub operation: crate::Operation, @@ -579,7 +579,7 @@ pub struct TextChangedEvent { /// changed. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct TextAttributesChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -1046,7 +1046,7 @@ impl From for EventBodyOwned { kind: event.operation.to_string(), detail1: event.index_in_parent, detail2: i32::default(), - // `OwnedValue` is constructed from the `ObjectRef` + // `OwnedValue` is constructed from the `crate::ObjectRef` // Only path to fail is to convert a Fd into an `OwnedValue`. // Therefore, this is safe. any_data: Value::from(event.child) @@ -1129,7 +1129,7 @@ impl From for EventBodyOwned { kind: String::default(), detail1: i32::default(), detail2: i32::default(), - // `OwnedValue` is constructed from the `ObjectRef` + // `OwnedValue` is constructed from the `crate::ObjectRef` // Only path to fail is to convert a Fd into an `OwnedValue`. // Therefore, this is safe. any_data: Value::from(event.child) diff --git a/atspi-common/src/events/terminal.rs b/atspi-common/src/events/terminal.rs index 1e38b95f..79f34d70 100644 --- a/atspi-common/src/events/terminal.rs +++ b/atspi-common/src/events/terminal.rs @@ -96,7 +96,7 @@ impl HasMatchRule for TerminalEvents { /// A line of text has been changed. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct LineChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -104,7 +104,7 @@ pub struct LineChangedEvent { /// able to fit on one *visual* line has changed. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ColumnCountChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -112,13 +112,13 @@ pub struct ColumnCountChangedEvent { /// able to fit within the terminal has changed. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct LineCountChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ApplicationChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -126,7 +126,7 @@ pub struct ApplicationChangedEvent { /// able to fit on one *visual* line has changed. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct CharWidthChangedEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } diff --git a/atspi-common/src/events/window.rs b/atspi-common/src/events/window.rs index 2a4e1b8d..2043ddeb 100644 --- a/atspi-common/src/events/window.rs +++ b/atspi-common/src/events/window.rs @@ -227,7 +227,7 @@ pub struct MaximizeEvent { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct RestoreEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -247,7 +247,7 @@ pub struct CreateEvent { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ReparentEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -267,37 +267,37 @@ pub struct DesktopDestroyEvent { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct DestroyEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ActivateEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct DeactivateEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct RaiseEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct LowerEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct MoveEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } @@ -310,19 +310,19 @@ pub struct ResizeEvent { #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct ShadeEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct UUshadeEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, } #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct RestyleEvent { - /// The [`ObjectRef`] which the event applies to. + /// The [`crate::ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, }