Benign cargo Download

reader.rs

Contains an unbounded block loopCalls native open or sys_open
SHA-256d5e39a615438434fcb19eaaec4614d5c909e3ca77de3ff1d219c6cfe53585fa5
MaleculeH₂(Db₂F)

Evidence

imports buffered::BufferedReader lines 1–21
1use std::old_io as io;
2
3use rustc_serialize::Decodable;
4
5use buffered::BufferedReader;
6use {
7 ByteString, CsvResult, Decoded, IntoVector,
8 Error, ParseError, ParseErrorKind,
9 StrAllocating,
10};
11
12use self::ParseState::{
13 StartRecord, EndRecord, StartField,
14 RecordTermCR, RecordTermLF, RecordTermAny,
15 InField, InQuotedField, InQuotedFieldEscape, InQuotedFieldQuote,
16};
17
18/// A record terminator.
19///
20/// Ideally, this would just be a `u8` like any other delimiter, but a useful
21/// CSV parser must special case CR …
English function-word token "the" lines 23–26
23:18… u won't need to use this type because `CRLF` is the default,
24/// which is by far the most widely used record terminator.
25#[derive(Copy)]
26pub enum R …
Calls native open or sys_open lines 165–172
165:45… io::IoResult<io::File>> {
166 Reader::from_reader(io::File::open(path))
167 }
168}
⋯4 lines
Contains an unbounded block loop lines 522–527
522:34… clone())
523 } else {
524 let mut headers = vec![];
525 loop {
526 let field = match self.next_field() {
527 NextField::EndOfRecord | NextField::EndOfCsv => break …
Rust calls mem::transmute lines 983–992
983:34… CsvResult<&'a [u8]>> {
984 unsafe {
985 ::std::mem::transmute(self.rdr.next_field().into_iter_result())
986 }
987 }
⋯5 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.