Skip to content
TILens What matters today in tech v0.4.0
Theme
Topics - Rust
Calendar · NOV 2026
‹ Nov 2026 ›
  1. JAN
  2. FEB
  3. MAR
  1. APR
  2. MAY
  3. JUN
  1. JUL
  2. AUG
  3. SEP
  1. OCT
  2. NOV
  3. DEC
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Favorites (0)

Community stream

Community

Trunk install fails because lightningcss library not compiling

I was trying to install trunk for learning yew, but it keeps failing because lightningcss fails to compile: error: could not compile `lightningcss` (lib) due to 61 previous errors warning: build failed, waiting for other jobs to finish... error:…

rust-users-forum

Adding retain_unsorted or similar

Just thought it was odd that there was no retain equivalent that uses swap_remove under the hood. Why not add something like this? fn retain_unordered<T, F>(vec: &mut Vec<T>, mut keep: F) where F: FnMut(&T) -> bool, { let mut i = 0; while i <…

rust-internals

Library SemVer considerations when it comes to default settings

How do you treat changes to default settings for your library's configuration? Are you strict and consider them part of your API or are you more lax and allow changes to the default settings within a major version? My concrete use case looks similar…

rust-users-forum

Pre-RFC: global_generic — crate-level type parameters

Pre-RFC: global_generic — crate-level type parameters Summary Add a global_generic declaration that lets a crate expose a type parameter which is bound exactly once, in main.rs, and then used anywhere in the dependency graph as if it were a concrete…

rust-internals

As_str for integers

I'm looking for ways to have str representations of ranges of integers without allocating. My current best attempt is to manually match on each value: match i { 0 => "0", 1 => "1", 2 => "2", ... n => "n" } which works, but has the obvious problem of…

rust-users-forum

Cannot borrow as mutable variable created with "let mut"

I'm trying to write a test and running into a problem. Here's the code: fn test_mix3parts_1(plain:&[u8],cipher:&[u8]) { let mut text_copy=plain.clone(); let len=plain.len(); let third=len/3; let rprime=find_max_order(third as u64) as usize;…

rust-users-forum

Can I create cyclic dependencies in docs?

I have a crate with some common types in it, and various crates that depend on it and use these common types. If I push the common types into the dependencies, I end up with a cyclic dependency graph, and cargo build will not function (which is a…

rust-users-forum

Into and As and Generic Type Constraints

hi, I'm having trouble with type constraints. In this example into() fails but casting with as works: fn example() { let a: u64 = 0; let b: f64 = a.into(); // Error - From<u64> not satisifed let c: f64 = a as f64; // Works } I have a generic…

rust-users-forum

Why is this unaligned?!

I have a struct of two u64's, and the code that tries ref_from_bytes, crashes, even though alignment is 8, and the slice is a multiple of 8. Even if I try a slice multiple of 16 (336..352 instead of 328..344), it still shows the same error message.…

rust-users-forum

How do I cast String to &str?

Sorry for the noob question. But I need to use &str, but can't find a way to concatenate it to return a value. I don't know how to implement the as_str() or just & here as instructed here. (click for more details) (click for more details) 12 posts -…

rust-users-forum

444 items available