Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T03:55:42.153Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

lib.rs

32 lines · 815 B · rust
1//! Minimal stand-in for the real `gpui_shared_string` crate. The lint keys
2//! off the crate name and the type name `SharedString`, so we only need to
3//! reproduce those.
4
5#[derive(Clone)]
6pub struct SharedString(String);
7
8impl SharedString {
9    pub const fn new_static(s: &'static str) -> Self {
10        // The real implementation stores the `'static` pointer; we just wrap
11        // an empty String at compile time to keep this `const`.
12        let _ = s;
13        SharedString(String::new())
14    }
15
16    pub fn new(s: impl AsRef<str>) -> Self {
17        SharedString(s.as_ref().to_owned())
18    }
19}
20
21impl From<&str> for SharedString {
22    fn from(s: &str) -> Self {
23        SharedString(s.to_owned())
24    }
25}
26
27impl From<String> for SharedString {
28    fn from(s: String) -> Self {
29        SharedString(s)
30    }
31}
32
Served at tenant.openagents/omega Member data and write actions are omitted.