diff options
| author | Shotaro Yamada <sinkuu@sinkuu.xyz> | 2018-10-27 21:41:26 +0900 |
|---|---|---|
| committer | Shotaro Yamada <sinkuu@sinkuu.xyz> | 2018-12-04 09:27:24 +0900 |
| commit | 11af6f66cb62cb577bbd787000f0ca57fbe1ee4a (patch) | |
| tree | 74717a03b6ddbdda1c335730534a8ffbe7688724 /src/libsyntax/str.rs | |
| parent | 25c375413ab8e24b01bef1d80d61dff58ef7bc1c (diff) | |
Use iterator and pattern APIs instead of `char_at`
Diffstat (limited to 'src/libsyntax/str.rs')
| -rw-r--r-- | src/libsyntax/str.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/libsyntax/str.rs b/src/libsyntax/str.rs deleted file mode 100644 index 281861918fd..00000000000 --- a/src/libsyntax/str.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[inline] -pub fn char_at(s: &str, byte: usize) -> char { - s[byte..].chars().next().unwrap() -} |
