Merge pull request 'Update Rust crate rand to 0.9.0' (#287) from renovate/rand-0.x into master
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			Reviewed-on: #287
This commit is contained in:
		@@ -35,7 +35,7 @@ uuid = { version = "1.11.0", features = ["v4", "serde"] }
 | 
				
			|||||||
lazy-regex = "3.3.0"
 | 
					lazy-regex = "3.3.0"
 | 
				
			||||||
thiserror = "2.0.0"
 | 
					thiserror = "2.0.0"
 | 
				
			||||||
image = "0.25.4"
 | 
					image = "0.25.4"
 | 
				
			||||||
rand = "0.8.5"
 | 
					rand = "0.9.0"
 | 
				
			||||||
bytes = "1.8.0"
 | 
					bytes = "1.8.0"
 | 
				
			||||||
tokio = "1.41.1"
 | 
					tokio = "1.41.1"
 | 
				
			||||||
futures = "0.3.31"
 | 
					futures = "0.3.31"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,6 @@
 | 
				
			|||||||
use rand::distributions::Alphanumeric;
 | 
					use rand::distr::{Alphanumeric, SampleString};
 | 
				
			||||||
use rand::Rng;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Generate a random string
 | 
					/// Generate a random string
 | 
				
			||||||
pub fn rand_str(len: usize) -> String {
 | 
					pub fn rand_str(len: usize) -> String {
 | 
				
			||||||
    let s: String = rand::thread_rng()
 | 
					    Alphanumeric.sample_string(&mut rand::rng(), len)
 | 
				
			||||||
        .sample_iter(&Alphanumeric)
 | 
					 | 
				
			||||||
        .take(len)
 | 
					 | 
				
			||||||
        .map(char::from)
 | 
					 | 
				
			||||||
        .collect();
 | 
					 | 
				
			||||||
    s
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user