[fractal/clippyfixes: 5/7] clippy: single-character string constant used as pattern




commit dd866e91f5c200dfd67289626955b01235c89aba
Author: Alexandre Franke <afranke gnome org>
Date:   Fri Oct 23 17:47:49 2020 +0200

    clippy: single-character string constant used as pattern
    
    https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern

 fractal-gtk/src/widgets/avatar.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/fractal-gtk/src/widgets/avatar.rs b/fractal-gtk/src/widgets/avatar.rs
index 3eb85935..82ed367b 100644
--- a/fractal-gtk/src/widgets/avatar.rs
+++ b/fractal-gtk/src/widgets/avatar.rs
@@ -93,7 +93,7 @@ impl AvatarExt for gtk::Overlay {
         /* remove IRC postfix from the username */
         let username = if let Some(u) = username {
             u.trim_end_matches(" (IRC)")
-                .trim_start_matches("#")
+                .trim_start_matches('#')
                 .to_owned()
         } else {
             id.clone()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]