Fix docs for `core::result::Result::map`.

`reader.read_line()` includes trailing newline char, which makes
`from_str` always return `None`.
auto merge of #14580 : utkarshkukreti/rust/fix-docs-for-result-map, r=alexcrichton

`reader.read_line()` includes trailing newline char, which makes
`from_str` always return `None`.