mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: Apply suggested fixes from clippy
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
@@ -41,11 +41,11 @@ pub fn docstring(attr: &str) -> Option<String> {
|
||||
let mut doc = attr
|
||||
.strip_prefix("doc = r\"")
|
||||
.unwrap()
|
||||
.strip_suffix("\"")
|
||||
.strip_suffix('\"')
|
||||
.unwrap()
|
||||
.to_string();
|
||||
if doc.starts_with(" ") {
|
||||
doc = doc.strip_prefix(" ").unwrap().to_string();
|
||||
if doc.starts_with(' ') {
|
||||
doc = doc.strip_prefix(' ').unwrap().to_string();
|
||||
}
|
||||
Some(doc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user