Content-Length: 262519 | pFad | http://github.com/adamcrume/java-properties/commit/4a1b62053e8a7d0fc0f65c02c15ba327b914f7d3

8D Decode now takes &[u8], per @adamcrume's suggestion · adamcrume/java-properties@4a1b620 · GitHub
Skip to content

Commit 4a1b620

Browse files
committed
Decode now takes &[u8], per @adamcrume's suggestion
1 parent 567f1fe commit 4a1b620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl<'a, R: Read> NaturalLines<'a, R> {
157157
}
158158
}
159159

160-
fn decode(&self, buf: &Vec<u8>) -> Result<NaturalLine, PropertiesError> {
160+
fn decode(&self, buf: &[u8]) -> Result<NaturalLine, PropertiesError> {
161161
match self.encoding.decode(buf, DecoderTrap::Strict) {
162162
Ok(s) => Ok(NaturalLine(self.line_count, s)),
163163
Err(_) => Err(PropertiesError::new(&format!("Error reading {} encoding", self.encoding.name()), None, Some(self.line_count))),

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/adamcrume/java-properties/commit/4a1b62053e8a7d0fc0f65c02c15ba327b914f7d3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy