Rename SharedUrl to SharedUri (#7084)

This PR renames `SharedUrl` to `SharedUri` to better reflect its intent.

I'm still not entirely happy with this naming, as the file paths that we
can store in here are not _really_ URIs, as they are lacking a protocol.

I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-01-30 09:54:23 -05:00 committed by GitHub
parent d18c0d9df0
commit 6c7893db35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 66 additions and 66 deletions

View file

@ -3,7 +3,7 @@ use gpui::*;
#[derive(IntoElement)]
struct ImageFromResource {
text: SharedString,
resource: SharedUrl,
resource: SharedUri,
}
impl RenderOnce for ImageFromResource {
@ -20,8 +20,8 @@ impl RenderOnce for ImageFromResource {
}
struct ImageShowcase {
local_resource: SharedUrl,
remote_resource: SharedUrl,
local_resource: SharedUri,
remote_resource: SharedUri,
}
impl Render for ImageShowcase {
@ -51,8 +51,8 @@ fn main() {
App::new().run(|cx: &mut AppContext| {
cx.open_window(WindowOptions::default(), |cx| {
cx.new_view(|_cx| ImageShowcase {
local_resource: SharedUrl::file("../zed/resources/app-icon.png"),
remote_resource: SharedUrl::network("https://picsum.photos/512/512"),
local_resource: SharedUri::file("../zed/resources/app-icon.png"),
remote_resource: SharedUri::network("https://picsum.photos/512/512"),
})
});
});