Skip to content

Commit

Permalink
chore: Suppress non-snake-case warnings. (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Aug 20, 2023
1 parent 3eadd48 commit d80d4df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion platforms/windows/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ impl PlatformNode {
}
}

#[allow(non_snake_case)]
impl IRawElementProviderSimple_Impl for PlatformNode {
fn ProviderOptions(&self) -> Result<ProviderOptions> {
Ok(ProviderOptions_ServerSideProvider)
Expand Down Expand Up @@ -657,6 +658,7 @@ impl IRawElementProviderSimple_Impl for PlatformNode {
}
}

#[allow(non_snake_case)]
impl IRawElementProviderFragment_Impl for PlatformNode {
fn Navigate(&self, direction: NavigateDirection) -> Result<IRawElementProviderFragment> {
self.resolve(|node| {
Expand Down Expand Up @@ -722,6 +724,7 @@ impl IRawElementProviderFragment_Impl for PlatformNode {
}
}

#[allow(non_snake_case)]
impl IRawElementProviderFragmentRoot_Impl for PlatformNode {
fn ElementProviderFromPoint(&self, x: f64, y: f64) -> Result<IRawElementProviderFragment> {
self.resolve_with_context(|node, context| {
Expand Down Expand Up @@ -832,7 +835,8 @@ macro_rules! patterns {
}
}
paste! {
$(impl [< I $base_pattern_id Provider_Impl>] for PlatformNode {
$(#[allow(non_snake_case)]
impl [< I $base_pattern_id Provider_Impl>] for PlatformNode {
$(fn $base_property_id(&self) -> Result<$com_type> {
self.resolve(|node| {
let wrapper = NodeWrapper::Node(&node);
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ pub(crate) struct FocusEventHandler {
received: Arc<ReceivedFocusEvent>,
}

#[allow(non_snake_case)]
impl FocusEventHandler {
#[allow(clippy::new_ret_no_self)] // it does return self, but wrapped
pub(crate) fn new() -> (
Expand All @@ -333,6 +332,7 @@ impl FocusEventHandler {
}
}

#[allow(non_snake_case)]
impl IUIAutomationFocusChangedEventHandler_Impl for FocusEventHandler {
fn HandleFocusChangedEvent(&self, sender: Option<&IUIAutomationElement>) -> Result<()> {
self.received.put(sender.unwrap().clone());
Expand Down
1 change: 1 addition & 0 deletions platforms/windows/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ impl Clone for PlatformRange {
// implementations. We assume that AccessKit is the only UIA provider
// within this process. This seems a safe assumption for most AccessKit users.

#[allow(non_snake_case)]
impl ITextRangeProvider_Impl for PlatformRange {
fn Clone(&self) -> Result<ITextRangeProvider> {
Ok(self.clone().into())
Expand Down

0 comments on commit d80d4df

Please sign in to comment.