| Crates.io | quirks |
| lib.rs | quirks |
| version | 0.4.0 |
| created_at | 2025-12-12 06:15:26.480815+00 |
| updated_at | 2026-01-09 01:09:12.435962+00 |
| description | Miscellaneous helper functions for your library or application |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1981049 |
| size | 11,540 |
Miscellaneous helper functions for your library or application.
Simply run the following inside your Rust project:
cargo add quirks
Include the quirk(s) you want to use:
use std::fs;
use anyhow::Result;
use quirks::Edible;
fn main() -> Result<()> {
let contents = fs::read_to_string("a_file_with_a_newline_at_the_end.txt")?.chomp();
println!("{}", contents); // No double-newline
Ok(())
}
Below is a list of all the quirks and what they do. For more details,
run cargo doc --open and browse the quirks crate.
chomp() function.nop!() macro, which does nothing (no operation).expand() function.git clone https://library.cat/rory/quirks
cd quirks
cargo build