From 4293dcb2540144cc69a9f1370103bb780eca69f3 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 4 Dec 2019 03:55:33 +0100 Subject: Rename `image::Handle::from_bytes` to `from_memory` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also, replace `image` example with a new `pokedex` example using the PokéAPI. --- native/src/widget/image.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'native') diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs index 1b3964d7..0d73fdb0 100644 --- a/native/src/widget/image.rs +++ b/native/src/widget/image.rs @@ -126,8 +126,11 @@ impl Handle { /// Creates an image [`Handle`] containing the image data directly. /// + /// This is useful if you already have your image loaded in-memory, maybe + /// because you downloaded or generated it procedurally. + /// /// [`Handle`]: struct.Handle.html - pub fn from_bytes(bytes: Vec) -> Handle { + pub fn from_memory(bytes: Vec) -> Handle { Self::from_data(Data::Bytes(bytes)) } -- cgit