huskies: merge 1158 story Reject boilerplate user stories at save time
This commit is contained in:
@@ -111,10 +111,9 @@ fn parse_pub_item(line: &str) -> Option<(String, String)> {
|
||||
let rest = if let Some(r) = trimmed.strip_prefix("pub(") {
|
||||
let end = r.find(')')?;
|
||||
r[end + 1..].trim_start()
|
||||
} else if let Some(r) = trimmed.strip_prefix("pub ") {
|
||||
r.trim_start()
|
||||
} else {
|
||||
return None;
|
||||
let r = trimmed.strip_prefix("pub ")?;
|
||||
r.trim_start()
|
||||
};
|
||||
|
||||
// Handle "async fn"
|
||||
@@ -139,10 +138,9 @@ fn parse_pub_item(line: &str) -> Option<(String, String)> {
|
||||
("const", r.trim_start())
|
||||
} else if let Some(r) = rest.strip_prefix("static ") {
|
||||
("static", r.trim_start())
|
||||
} else if let Some(r) = rest.strip_prefix("mod ") {
|
||||
("mod", r.trim_start())
|
||||
} else {
|
||||
return None;
|
||||
let r = rest.strip_prefix("mod ")?;
|
||||
("mod", r.trim_start())
|
||||
};
|
||||
|
||||
let name: String = name_part
|
||||
|
||||
Reference in New Issue
Block a user