This file contains hidden or 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 hidden or 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 hidden or 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
| 0eNrdnU1vIzmShv9KwWdpkPwm6zY9pz0NsIs9DRoF2aVyC62yvLLcu4NB//dVpj6scpHS+8hKLLBzmHbarsdMRjLEjHgj+K+7++Xr/Hm9eNp8uV+tfr/7/K+377zcff7HyWX/s5en2fN0s5o+rhdf++v/uftsbDe5++fw3z8nd7P7l9XydTOf9r/5vHh6vPu8Wb/OJ3fPq5fFZrF6mq7ny9lm8cf8HWZPGSCLh9XT7o+/LB6fZsv+V55m3+d3n+/Ws8Xyrv+Vp6/z/o//Oan90up+9bxab05+0f756+Ru/rTZjmG+Qw8X//zy9Pr9fr7ekiaHf/3wuv5j/nXa/6Xp7O5t5PuBTu0w0KlxW/rXxXr+sPuhsf1Y3lGtSm1AY4XpVKYxGQzVy1gLBhuq1PvKtKY91AhjjSq1Aa2NNKlMYxwYapaxFgy2yNNqzI6afoTWhmo6fQoO0BrmbSm9bLaEx982A6iC2a35ab58w8bKY+uKfsdOHmpjrFWql8fqzk5k0Dk7THj3QPoa9W3xDLiH32aLp+neh/5MLn8JO7b/yzt6FZ5+hLewsWPYrGFNB7lFf6pSdYprVNvJrnTvoJ1gNysvK2uq1CrUylCnQ+VVZYMO9TI06dAgQ4sOjSrUAUMlGQoMlWUoMFSRobqhXCdDdUM5eUV53VBOXlFeN5STV5TXDeXkFeWBoeQV5YGh5BUVgKHkFRWAoeQVFYCh5BUVdEN5eUUF3VBeXlFRN5SXV1TUDeXlFRV1Q3l5RUVgKHlFRWAoeUUlYCh5RSVgKHlFJWAoeUUl3VBBXlFJN1SQV1TWDRXkFZV1QwV5RWXdUEFeURkYSl5RGRhKXlEFGEpeUQUYSl5RBRhKXlFFN1SUV1TRDRXlSJ/prE6VI33Tw8u6vRxJiHqs7witYTx65feHd+ju/Tt0rsGDPp9Jv/Oo3/nZW39bQfeLx+l8uf2j68XD9Hm1nP/M2sV4uiooE5A9RyqE5M+QUkdI+81hnfS2KI7B80rQZg+Y3K3n//U6f9l |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |