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:
parent
d18c0d9df0
commit
6c7893db35
14 changed files with 66 additions and 66 deletions
|
@ -2,7 +2,7 @@ use std::sync::Arc;
|
|||
|
||||
use crate::{
|
||||
point, size, Bounds, DevicePixels, Element, ElementContext, ImageData, InteractiveElement,
|
||||
InteractiveElementState, Interactivity, IntoElement, LayoutId, Pixels, SharedUrl, Size,
|
||||
InteractiveElementState, Interactivity, IntoElement, LayoutId, Pixels, SharedUri, Size,
|
||||
StyleRefinement, Styled,
|
||||
};
|
||||
use futures::FutureExt;
|
||||
|
@ -13,7 +13,7 @@ use util::ResultExt;
|
|||
#[derive(Clone, Debug)]
|
||||
pub enum ImageSource {
|
||||
/// Image content will be loaded from provided URI at render time.
|
||||
Uri(SharedUrl),
|
||||
Uri(SharedUri),
|
||||
/// Cached image data
|
||||
Data(Arc<ImageData>),
|
||||
// TODO: move surface definitions into mac platform module
|
||||
|
@ -21,8 +21,8 @@ pub enum ImageSource {
|
|||
Surface(CVImageBuffer),
|
||||
}
|
||||
|
||||
impl From<SharedUrl> for ImageSource {
|
||||
fn from(value: SharedUrl) -> Self {
|
||||
impl From<SharedUri> for ImageSource {
|
||||
fn from(value: SharedUri) -> Self {
|
||||
Self::Uri(value)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue