docs.rs
Rust library for approximate string matching Stringmetrics This is a Rust library for approximate string matching that implements simple algorithms such has Hamming distance, Levenshtein distance, Jaccard similarity, and more. Here are some useful quick links: Crate info: https://crates.io/crates/stringmetrics Crate docs: https://docs.rs/stringmetrics/ Python...
Crate
v2.2.2
2022-12-28
rust-lang.github.io
...If you write #[core::derives::skip], the macro matches it
If you use core::derives::skip; and write #[skip], the macro matches it
If you use elsewhere::skip (or no import at all) and write #[skip], the
macro doesn’t match it.
We already have some interaction between macros and...
Compiler
2025-08-20
~9 min read
blog.arcjet.com
...In the Result::Ok case it will always return a tuple of strings, where the first string is the remaining text that was not processed, and the second element is the text that was successfully matched by the parser.If it fails to parse then it will return a Result...
Rust Walkthroughs
2024-11-20
~7 min read
analog-hors.github.io
...pub fn step(&mut self) {
let opcode = self.take_byte_at_pc();
let aaa = (opcode >> 5) & 0b111;
let bbb = (opcode >> 2) & 0b111;
let cc = opcode & 0b11;
match (aaa, bbb, cc) {
(8.., _, _) | (_, 8.., _) | (_, _, 4..) => unreachable!(),
// match on opcode parts...
}
}
}
The main idea was that I'd be able to use different...
Rust Walkthroughs
2023-04-26
~17 min read
arXiv
arxiv.org
...We also prove a matching lower bound on the number of honest parties required for 2-step termination.
We show that our latency-reduction technique generalizes beyond RBC and applies to other primitives such as asynchronous verifiable secret sharing (AVSS) and asynchronous verifiable information dispersal (AVID), enabling them to complete...
Distributed Computing
Nibesh Shrestha, Qianyu Yu, Aniket Kate et al.
2025-05-05
arXiv:2505.02761
iximiuz.com
...libc::c_int) {
println!("[main] What a surprise! Got SIGCHLD!");
match waitpid(Pid::from_raw(-1), None) {
Ok(status) => println!("[main] Child exited with status {:?}", status),
Err(err) => panic!("[main] waitpid() failed: {}", err),
}
println!("[main] Bye Bye!");
exit(0);
}
fn main() {
println!("[main] Hi there! My PID is {}.", getpid());
match...
News & Blog Posts
2019-10-22
~17 min read
newrustacean.com
...Paths and matches and SIMD, cargo new changes, and tons of
community-driven learning materials!
Audio
0.5⨉
1⨉
1.25⨉
1.5⨉
1.75⨉
2⨉
§Show Notes
Rust 1.25.0 blog post
RFC #1358 – #[repr(align)]
RFC #2325 – SIMD stabilization
RustConf CFP
Hello Rust
“Functional and Concurrent Programming...
News & Blog Posts
2018-04-03
~1 min read
github.com
...Note that slicing is "exclusive" (so `[n..m]` is the interval `n <= x
< m`), while `..` in `match` patterns is "inclusive". To avoid
confusion, we propose to change the `match` notation to `...` to
reflect the distinction. The reason to change the notation, rather
than the interpretation, is that the exclusive (respectively...
RFC 198
RFC
2014-09-11
~6 min read
github.com
...Crate name patterns can either be regular crate names or they
can end with a `*` character to match zero or more characters.
For example, a crate name pattern of `lazy_static` will only make the token
apply to the corresponding crate, while `serde*` allows the token to act on
any...
RFC 2947
RFC
2022-11-08
~6 min read
adventures.michaelfbryan.com
...To see why this is important, let’s have a look at how many web links there are
in some of the books on my computer.
# The Rust Programming Language (aka "The Book")
$ cd ~/Documents/forks/book
$ rg 'http(s?)://' --stats --glob '*.md' --quiet
421 matches
415 matched lines
330...
News & Blog Posts
2020-05-05
~27 min read
lawngno.me
tl;dr
I’ve been comparing crates on crates.io against their upstream repositories in
an effect to detect (and, ultimately, help prevent) supply chain attacks like
the xz backdoor1, where the code published in a package doesn’t match the
code in its repository.
The results of these comparisons...
Observations/Thoughts
2024-06-12
~9 min read
doc.rust-lang.org
pub fn current_exe() -> io::Result<crate::path::PathBuf>
...For example, on some Unix platforms, the result is calculated by searching $PATH for an executable matching argv[0], but both the environment and arguments can be be set arbitrarily by the user who invokes the program.
On Linux, if fs.secure_hardlinks is not set, an attacker who can...
function
std
Stable since 1.0.0
Version 1.100.0-nightly
www.slowtec.de
...Vec<_> = key.split(".").collect();
match deep_lookup(&keys, locale) {
Some(res) => res,
None => key.to_string(),
}
}
None => key.to_string(),
}
}
}
fn deep_lookup(keys: &[&str], map: &Map<String, Value>) -> Option<String> {
match &keys {
[] => None,
[last] => map.get(&last.to_string()).and_then(|x| match x {
Value::String(s) => Some(s...
News & Blog Posts
2020-03-03
~10 min read
www.sea-ql.org
...non-exhaustive patterns: `&_` not covered | | match table_ref { | ^^^^^^^^^ pattern `&_` not covered |note: `TableRef` defined here | | pub enum TableRef { | ^^^^^^^^^^^^^^^^^ = note: the matched value is of type `&TableRef` = note: `TableRef` is marked as non-exhaustive, so a wildcard `_` is necessary to match exhaustivelyhelp: ensure that all possible cases are being handled by...
Project/Tooling Updates
2025-09-03
~11 min read
willcrichton.net
...tyrade! {
enum TList {
TNil,
TCons(Type, TList)
}
enum TOption {
TNone,
TSome(Type)
}
// Get the Nth item from the list, where Index is either Z or S<N>
fn Nth<List, Index>() {
match List {
TNil => TNone,
TCons(X, XS) => match Index {
Z => TSome(X),
S(IMinusOne) => Nth(XS, IMinusOne)
}
}
}
}
fn main...
Observations/Thoughts
2021-01-06
~7 min read
rodolfoghi.github.io
...2
Os casos do match também são padrões como if let:1
2
3
4
5
6
7
fn print_number(n: Number) {
match n {
Number { odd: true, value } => println!("Odd number: {}", value),
Number { odd: false, value } => println!("Even number: {}", value),
}
}
// isso imprime o mesmo de antes
Variáveis são imutáveis...
Learn Standard Rust
2020-08-11
~9 min read
rustc-dev-guide.rust-lang.org
...Pattern matching
match statements for enums with variants that have fields are lowered to TerminatorKind::SwitchInt, too, but the Operand refers to a Place where the discriminant of the value can be found. This often involves reading the discriminant to a new temporary variable.
Aggregate construction
Aggregate values of any...
Guide to Rustc Development
Book
2024-01-01
~4 min read
foon.uk
...Actually, this whole match statement is kind of bulky and I
had planned to get it working with match and then see if Rust had anything
like Scala's Map for Options. Since match is giving us grief, let's just
do that now. Guessing:
pub fn id_at(state...
Blog Posts
2014-11-10
~38 min read
siciarz.net
...extern crate libc;
use std::c_str::CString;
use libc::c_char;
#[no_mangle]
pub extern "C" fn count_substrings(value: *const c_char, substr: *const c_char) -> i32 {
let c_value = unsafe { CString::new(value, false) };
let c_substr = unsafe { CString::new(substr, false) };
match c_value.as_str...
The end of 24 Days of Rust
2014-12-29
~4 min read
docs.rs
Procedural macro for html5ever.
Crate
v0.35.0
2025-07-02