Skip to content

Commit

Permalink
Merge pull request #2 from zz85/optimizations
Browse files Browse the repository at this point in the history
Reduce string allocations while parsing
  • Loading branch information
ctz authored Apr 17, 2021
2 parents ae1c51e + 2ef75c2 commit f68646c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pemfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Item {
/// You can use this function to build an iterator, for example:
/// `for item in iter::from_fn(|| read_one(rd).transpose()) { ... }`
pub fn read_one(rd: &mut dyn io::BufRead) -> Result<Option<Item>, io::Error> {
let mut b64buf = String::new();
let mut b64buf = String::with_capacity(1024);
let mut section_type = None;
let mut end_marker = None;
let mut line = String::with_capacity(80);
Expand Down

0 comments on commit f68646c

Please sign in to comment.