max / makenotwork
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
3 files changed,
+15 insertions,
-5 deletions
| @@ -45,6 +45,16 @@ | |||
| 45 | 45 | unknown-registry = "deny" # no crate may come from a registry other than the allow-list below | |
| 46 | 46 | unknown-git = "deny" # no crate may come from an unsanctioned git remote | |
| 47 | 47 | allow-registry = ["https://github.com/rust-lang/crates.io-index"] | |
| 48 | + | # Our own forge. docengine is consumed as a git dep on purpose (Cargo.toml:122) | |
| 49 | + | # so a container build can take it without the repo checked out beside this one; | |
| 50 | + | # multithreaded and GoingsOn keep path deps to the same crate. | |
| 51 | + | # | |
| 52 | + | # This is invisible on a dev box: ~/Code/.cargo/config.toml patches this URL (and | |
| 53 | + | # three more makenot.work git deps) to local checkouts, so `cargo deny` run from | |
| 54 | + | # ~/Code sees a path dependency and reports sources ok. The Sando worktree lives | |
| 55 | + | # under /srv/sando and inherits no such patch, which is why the gate is the thing | |
| 56 | + | # that sees the real dependency graph. When these disagree, the gate is right. | |
| 57 | + | allow-git = ["https://makenot.work/git/max/docengine.git"] | |
| 48 | 58 | ||
| 49 | 59 | [licenses] | |
| 50 | 60 | version = 2 |
| @@ -506,7 +506,7 @@ | |||
| 506 | 506 | /// Parse the body as JSON. | |
| 507 | 507 | pub(crate) fn json<T: serde::de::DeserializeOwned>(&self) -> T { | |
| 508 | 508 | serde_json::from_str(&self.text) | |
| 509 | - | .unwrap_or_else(|e| panic!("Failed to parse JSON: {}\nBody: {}", e, &self.text)) | |
| 509 | + | .unwrap_or_else(|e| panic!("Failed to parse JSON: {}\nBody: {}", e, self.text)) | |
| 510 | 510 | } | |
| 511 | 511 | ||
| 512 | 512 | /// Get a header value as a string. |
| @@ -132,7 +132,7 @@ | |||
| 132 | 132 | ||
| 133 | 133 | auth_as(&mut h, user_id, app_id, evil); | |
| 134 | 134 | let hash = fake_hash(0x01); | |
| 135 | - | let s3_key = format!("{}/{}/{}", app_id, user_id, &hash); | |
| 135 | + | let s3_key = format!("{app_id}/{user_id}/{hash}"); | |
| 136 | 136 | // Confirm records the authoritative S3 object size, so store the full | |
| 137 | 137 | // declared count to keep the per-key counter assertion below meaningful. | |
| 138 | 138 | blobs.put(&s3_key, vec![0u8; 1024]); | |
| @@ -191,7 +191,7 @@ | |||
| 191 | 191 | auth_as(&mut h, user_id, app_id, weird); | |
| 192 | 192 | ||
| 193 | 193 | let hash = fake_hash(0x02); | |
| 194 | - | let s3_key = format!("{}/{}/{}", app_id, user_id, &hash); | |
| 194 | + | let s3_key = format!("{app_id}/{user_id}/{hash}"); | |
| 195 | 195 | blobs.put(&s3_key, vec![0u8; 8]); | |
| 196 | 196 | ||
| 197 | 197 | h.client | |
| @@ -230,7 +230,7 @@ | |||
| 230 | 230 | auth_as(&mut h, user_id, app_id, &huge); | |
| 231 | 231 | ||
| 232 | 232 | let hash = fake_hash(0x03); | |
| 233 | - | let s3_key = format!("{}/{}/{}", app_id, user_id, &hash); | |
| 233 | + | let s3_key = format!("{app_id}/{user_id}/{hash}"); | |
| 234 | 234 | blobs.put(&s3_key, vec![0u8; 8]); | |
| 235 | 235 | h.client | |
| 236 | 236 | .post_json( | |
| @@ -337,7 +337,7 @@ | |||
| 337 | 337 | ||
| 338 | 338 | auth_as(&mut h, user_id, app_id, "A"); | |
| 339 | 339 | let hash = fake_hash(0x04); | |
| 340 | - | let s3_key = format!("{}/{}/{}", app_id, user_id, &hash); | |
| 340 | + | let s3_key = format!("{app_id}/{user_id}/{hash}"); | |
| 341 | 341 | blobs.put(&s3_key, vec![0u8; 8]); | |
| 342 | 342 | ||
| 343 | 343 | h.client |