I hereby claim:
- I am martinmroz on github.
- I am martinmroz (https://keybase.io/martinmroz) on keybase.
- I have a public key ASAzlqHwmUQVK6z6SrEAFQhkWMoUThrk1qvLQbyPRpjdWQo
To claim this, I am signing this object:
#[derive(Copy, Clone, Eq, PartialEq, Debug, Hash)] | |
struct Flux { | |
/// The type of the left-most character in the chunk. | |
pub leftmost_char_type: CharType, | |
/// The number of words in the chunk. | |
pub words: usize, | |
/// The number of lines in the chunk. | |
pub lines: usize, | |
/// The type of the right-most character in the chunk. | |
pub rightmost_char_type: CharType, |
file | wc time | wc mem | wc_rs time | wc_rs mem | |
---|---|---|---|---|---|
empty.txt | 0.00s | 671kB | 0.00s | 761kB | |
big.txt | 0.02s | 1.72MB | 0.02s | 1.29MB | |
huge.txt | 0.32s | 1.72MB | 0.35s | 1.29MB |
let mut last_char_type = CharType::IsSpace; | |
'buffer_loop: loop { | |
let buffer = input.fill_buf()?; | |
let length = buffer.len(); | |
if length == 0 { | |
break 'buffer_loop; | |
} | |
// Update the byte counter from the buffer. |
file | wc time | wc mem | wc_rs time | wc_rs mem | |
---|---|---|---|---|---|
empty.txt | 0.00s | 671kB | 0.00s | 753kB | |
big.txt | 0.02s | 1.72MB | 0.02s | 7.27MB | |
huge.txt | 0.32s | 1.72MB | 0.45s | 99.73MB |
fn main() { | |
let target_path = std::env::args().nth(1).expect("No file path specified"); | |
// Count the bytes, words and lines in the specified file. | |
let whole_file_string = std::fs::read_to_string(&target_path).expect("Unable to read file"); | |
let bytes = whole_file_string.len(); | |
let words = whole_file_string.split_whitespace().count(); | |
let lines = whole_file_string.lines().count(); |
public final class RootFlow { | |
// MARK: - Private Properties | |
private let navigationController: UINavigationController | |
private var presented: Bool = false | |
// MARK: - Private Properties - View Controllers | |
private lazy var simpleViewController = SimpleViewController(delegate: self) |
public protocol SimpleViewControllerDelegate: class { | |
func simpleViewControllerAction(_ viewController: SimpleViewController) | |
} | |
public final class SimpleViewController { | |
// MARK: - Public Properties | |
public weak var delegate: SimpleViewControllerDelegate? = nil |
I hereby claim:
To claim this, I am signing this object: