Modify range in pytype.rs

For readability, replace exclusive range with inclusive range.
This commit is contained in:
Tony Jinwoo Ahn
2021-10-13 21:19:35 +09:00
parent 7d6b36a55f
commit fcf07fcf9f

View File

@@ -672,8 +672,7 @@ impl PyType {
const SIGNATURE_END_MARKER: &str = ")\n--\n\n";
fn get_signature(doc: &str) -> Option<&str> {
doc.find(SIGNATURE_END_MARKER)
.map(|index| &doc[..index + 1])
doc.find(SIGNATURE_END_MARKER).map(|index| &doc[..=index])
}
fn find_signature<'a>(name: &str, doc: &'a str) -> Option<&'a str> {