Skip to content

Commit

Permalink
Fix +beta clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Jun 30, 2022
1 parent 92170a7 commit 1f996a0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/clock/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ fn build_ui(application: &Application) {
}

fn current_time() -> String {
return format!("{}", Local::now().format("%Y-%m-%d %H:%M:%S"));
format!("{}", Local::now().format("%Y-%m-%d %H:%M:%S"))
}
2 changes: 1 addition & 1 deletion gdk4/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ macro_rules! define_event {
}

pub fn upcast_ref(&self) -> &crate::Event {
&*self
self
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions gsk4/src/render_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ macro_rules! define_render_node {
($rust_type:ident, $ffi_type:path, $node_type:path) => {
impl std::convert::AsRef<crate::RenderNode> for $rust_type {
fn as_ref(&self) -> &crate::RenderNode {
&*self
self
}
}

Expand All @@ -142,7 +142,7 @@ macro_rules! define_render_node {
}

fn upcast_ref(&self) -> &crate::RenderNode {
&*self
self
}
}

Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ macro_rules! define_expression {
}

pub fn upcast_ref(&self) -> &crate::Expression {
&*self
self
}
}

Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/param_spec_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl ParamSpecExpression {
}

pub fn upcast_ref(&self) -> &ParamSpec {
&*self
self
}
}

Expand Down

0 comments on commit 1f996a0

Please sign in to comment.