Benign rust 3,548 installs Download

cranpose-assets 0.1.173

“Asset loading and management utilities for Cranpose”

Release published within seven daysThree releases published within 24 hours
SHA-2560db79e5c64bdc0a2b128e26008812850a29627305dde26dabdf45c24d4c5efb3

Evidence

imports super::* assets_tests.rs · lines 1–13
1use super::*;
2
3fn test_asset_root() -> PathBuf {
⋯4 lines
8}
9
10#[test]
11fn an_earlier_root_wins_over_one_added_later() {
12 let base = test_asset_root().join("root-order");
13 let first = base.join …
imports std::collections::HashMap lib.rs · lines 1–15
1//! Asset loading and management primitives for Cranpose.
2
3use std::{
4 collections::HashMap,
5 fmt,
6 path::{Component, Path, PathBuf},
7 sync::{Arc, Mutex, MutexGuard, PoisonError},
8};
9
10/// Error returned by [`AssetManager`] load operations.
11#[derive(Debug)]
12pub enum AssetError {
13 /// The requested asset path is empty.
14 EmptyPath,
15 /// Asset paths must be relative to a registe …
English function-word token "with" lib.rs · lines 81–88
81:2… }
82 }
83}
84
85/// Synchronous asset manager with root-based lookup and byte caching.
86#[derive(Debug)]
87pub struct AssetManager {
88 roots: Vec<P …
Rust reads current directory lib.rs · lines 93–99
93:57… orking directory.
94 pub fn new() -> Self {
95 let root = std::env::current_dir().unwrap_or_else(|_| PathBuf::from("."));
96 Self::with_root(root)
97 }
98
99 /// Creates an asset manager with a single as …
#[cfg(test)] attribute lib.rs · lines 200–207
200:8… return Err(AssetError::EmptyPath);
201 }
202 Ok(normalized)
203}
204
205#[cfg(test)]
206#[path = "tests/assets_tests.rs"]
207mod tests;

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.