
Ranckin
Mentor by passion, student by profession
Rust Devblog 261 Apr 2026
If you use #![deny(clippy::pedantic)] or custom lints, they are now more predictable.
cargo script script.rs Add #!/usr/bin/env cargo-script shebang and chmod +x for executable scripts. 4. Standard library: integer::is_multiple_of What’s new: New method is_multiple_of on integer types. rust devblog 261
#!/usr/bin/env cargo-script //! ```cargo //! [dependencies] //! regex = "1.10" //! anyhow = "1.0" //! ``` use regex::Regex; use anyhow::Result; If you use #
let x = 42u32; assert!(x.is_multiple_of(7)); assert!(!x.is_multiple_of(5)); Avoids division by zero — it’s a panic (same as % ). 5. Cargo: --ignore-rust-version flag What’s new: Build crates even if they require a newer Rust version than your current toolchain. let x = 42u32
fn main() -> Result<()> let re = Regex::new(r"\d+")?; println!("Found numbers: :?", re.find_all("a1 b2 c3")); Ok(())