This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package(default_visibility = ["//visibility:public"]) | |
load("@rules_rust//rust:defs.bzl", "rust_binary") | |
rust_binary( | |
name = "bin", | |
srcs = ["repro.rs"], | |
deps = [ | |
"@crates//:utoipa-swagger-ui", | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nacl.secret import SecretBox | |
# -------- encryption with a random nonce -------- | |
key = b"A" * 32 | |
ciphertext = SecretBox(key).encrypt(b"hello") | |
print("\nciphertext:", ciphertext) | |
plaintext = SecretBox(key).decrypt(ciphertext) | |
print("\nplaintext:", plaintext) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0eNrNm11v2koQhv9K5Gu78s7s+oO7Sv0F55y7KIoMsahVYpCBnFYV/71rvE4oON53gpFyhSDwdD9mPPPOTH8H89W+3DRVvXucr9c/gtnvt0+2wez+5G37t21dbKLdOlo21VP7/mcw03EY/GpfDmFQzLfr1X5XRu33NlW9DGa7Zl+GQbVY1x1uWy3rYtX+ti6ey2AWNEW1Cuxvq/qptDh1eAiDst5Vu6rsfnF88+ux3j/Py8Z+ITz9ZeR4YbBZb+1v1vXrsr6Y48KU+WIs/qlqykX3d30IL6j0St3uLHf5fRcdF3bBVR009SMZRTKM1CjSwEiDIlMYmaDIHEam8PXg95PBTPyCcpiJ35CKYSh+R0rBUPyWFOxFhF+Tgv2I8HtSsCeR4KJgXyLBRcHeRIKLgv2JBRcFOxQLLgr2KMYvimCPYvyiCPYoxi+K3jxqXi2jcmW/3FSLaLNelZfgLhJTfBgisYREoygtQelRlJHFXWLgzBJZ4IWYqSzyQsxMFnohZi6LvQiTY2HwhaBKGH0hKAnDLwRlYfiFoFoYfiGoEYZfCJoIwy8ETYXhF4JmwvALQXNh+EWgOhaGXwiqhOEXgpIw/EJQFoZfCKqF4ReCGkxsRr3YJH0uNhW1gvZ/+0GrZu9tQDeh9RTzEN63L6ENpubBfqPalc9tQH1V22GwKualVcrBv24/9qOXstkesSahXOe50XGaJCm/6ee43cbn1eyLffNSPh1vJioGnnbZcWHpxRmOKXYPs82hLpnJqGI/Rc7fjUk5sEyNMt1DKfcv06BIl2eeGTqNSnYPstcDfBhV6Z4rcVl15l9YhiJ7TZEdRmX5tbnviRiH9kj09x6zcS2ObfIcquJxMQ6ZCaXASlloJ+fQ4ZXiyVDnyhz7nUQZoTOzOluqR41j7nxOvU6NUza4fxpX4779d6GLB136RH9jj25m4BgpFj68mUUC3Hc3ZhBK4wL8SFt8L6r63TyA+jyAh/KAUVHuO11nTplHkPuOk3uMf+dGtHPd7zw/33k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/platform.rs b/src/platform.rs | |
index cd8ef63..4452780 100644 | |
--- a/src/platform.rs | |
+++ b/src/platform.rs | |
@@ -292,13 +292,13 @@ impl Platform { | |
return; | |
} | |
match self { | |
- // Safe because detect() checked for platform support. | |
- #[cfg(blake3_avx512_ffi)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def open_ten_files(): | |
files = [open("/dev/null") for _ in range(10)] | |
silly_map1 = {"files": files} | |
silly_map2 = {"files": files} | |
silly_map1["other_map"] = silly_map2 | |
silly_map2["other_map"] = silly_map1 | |
return silly_map1 | |
mylist = [] | |
max_len = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
#include <cstdio> | |
#include <mutex> | |
#define GLOG_USE_GLOG_EXPORT | |
#include <folly/Synchronized.h> | |
class IntBumper { | |
public: | |
IntBumper(uint64_t &x) : m_ptr(&x) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::ptr; | |
pub struct List<T> { | |
head: Link<T>, | |
tail: *mut Node<T>, // DANGER DANGER | |
} | |
type Link<T> = Option<Box<Node<T>>>; | |
struct Node<T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let my_string = String::from("foo"); | |
let mut my_vec = Vec::<&String>::new(); | |
my_vec.push(&my_string); | |
// drop(my_string); | |
println!("{:?}", my_vec); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn foo<'left, 'right>(_: &mut &'left i32, _: &mut &'right i32) | |
where | |
'left: 'right, | |
{ | |
} | |
// fn foo<'both>(_: &mut &'both i32, _: &mut &'both i32) {} | |
fn main() { | |
let a = 42; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
struct Foo { | |
const int &x; | |
}; | |
struct ConvertedFoo { | |
const int &x; | |
// Foo is implicitly convertible to ConvertedFoo |
NewerOlder