diff --git a/examples/tag.rs b/examples/tag.rs
index 921863bee3..86fa9aca11 100644
--- a/examples/tag.rs
+++ b/examples/tag.rs
@@ -65,7 +65,7 @@ fn run(args: &Args) -> Result<(), Error> {
} else if args.flag_list {
let pattern = args.arg_pattern.as_ref().map(|s| &s[..]).unwrap_or("*");
for name in repo.tag_names(Some(pattern))?.iter() {
- let name = name.expect("Not invalid utf8").expect("Not None");
+ let name = name.expect("Not invalid utf8");
let obj = repo.revparse_single(name)?;
if let Some(tag) = obj.as_tag() {
diff --git a/src/remote.rs b/src/remote.rs
index 0037b53975..448de0e1e2 100644
--- a/src/remote.rs
+++ b/src/remote.rs
@@ -886,7 +886,7 @@ mod tests {
assert_eq!(remotes.len(), 1);
assert_eq!(remotes.get(0), Ok(Some("origin")));
assert_eq!(remotes.iter().count(), 1);
- assert_eq!(remotes.iter().next().unwrap(), Ok(Some("origin")));
+ assert_eq!(remotes.iter().next().unwrap(), Ok("origin"));
}
origin.connect(Direction::Push).unwrap();
diff --git a/src/string_array.rs b/src/string_array.rs
index 8d68616cfc..d320193ac3 100644
--- a/src/string_array.rs
+++ b/src/string_array.rs
@@ -52,8 +52,8 @@ impl StringArray {
/// Returns an iterator over the strings contained within this array.
///
- /// The iterator yields `Option<&str>` as it is unknown whether the contents
- /// are utf-8 or not.
+ /// The iterator yields `Result<&str, Error>` as it is unknown whether the
+ /// contents are utf-8 or not.
pub fn iter(&self) -> Iter<'_> {
Iter {
range: 0..self.len(),
@@ -92,7 +92,7 @@ impl Binding for StringArray {
}
impl<'a> IntoIterator for &'a StringArray {
- type Item = Result