Dependências: getrandom 0.4
getrandom::getrandom virou getrandom::fill na 0.3. Substitui o PR #3 do Dependabot, que foi fechado e não é recriado. O uso é só a geração do token do guara ui (16 bytes). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RRZm8uTVN3WLTwcbrDQAUM
This commit is contained in:
1 parent
757ec65822
commit
cf9323c2b5
3 files changed
+4
-21
No files matched your search
@@ -26,7 +26,7 @@ pub fn run(port: u16, open: bool) -> Result<(), String> {
|
||||
.map(|a| a.port())
|
||||
.unwrap_or(port);
|
||||
let mut tok = [0u8; 16];
|
||||
getrandom::getrandom(&mut tok).map_err(|e| e.to_string())?;
|
||||
getrandom::fill(&mut tok).map_err(|e| e.to_string())?;
|
||||
let token: Arc<str> = tok
|
||||
.iter()
|
||||
.map(|b| format!("{b:02x}"))
|
||||
|
||||
Reference in new issue
Block a user