-LL | assert_eq!(s["hello, ".len()..].to_uppercase(), "WORLD!");
- | ^^^^^^^^^^^^^^^^^^^^
- |
-note: the prefix was tested here
- --> $DIR/min_rust_version_attr.rs:203:9
- |
-LL | if s.starts_with("hello, ") {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: `-D clippy::manual-strip` implied by `-D warnings`
-help: try using the `strip_prefix` method
- |
-LL ~ if let Some(<stripped>) = s.strip_prefix("hello, ") {
-LL ~ assert_eq!(<stripped>.to_uppercase(), "WORLD!");