summaryrefslogtreecommitdiff
path: root/cli/tsc.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-06-05 04:23:07 +0200
committerBert Belder <bertbelder@gmail.com>2020-06-05 05:11:15 +0200
commit9a783ae4e6789fc90c8a6d62e846c9abd29e7d2f (patch)
treef29deee9518be75fc4b4d99e4e3c24343de83053 /cli/tsc.rs
parent7069d60423979858ece856d52ef9567a50f8ef76 (diff)
ci: upgrade to Rust 1.44.0 (#6113)
Diffstat (limited to 'cli/tsc.rs')
-rw-r--r--cli/tsc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs
index 2eb8a35a0..1b3208e75 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -833,12 +833,12 @@ impl SourceMapGetter for TsCompiler {
self
.try_resolve_and_get_source_file(script_name)
.and_then(|out| {
- str::from_utf8(&out.source_code).ok().and_then(|v| {
+ str::from_utf8(&out.source_code).ok().map(|v| {
// Do NOT use .lines(): it skips the terminating empty line.
// (due to internally using .split_terminator() instead of .split())
let lines: Vec<&str> = v.split('\n').collect();
assert!(lines.len() > line);
- Some(lines[line].to_string())
+ lines[line].to_string()
})
})
}