From 74d4267d17d6663cdef67bbd99105abd98b1f474 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Sun, 24 Sep 2023 17:27:31 +1000 Subject: [PATCH] nannou_osc: update rosc from 0.1 to 0.10 Also re-export new types. --- nannou_osc/Cargo.toml | 2 +- nannou_osc/src/lib.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nannou_osc/Cargo.toml b/nannou_osc/Cargo.toml index 2ac7ec553..c5142d3c5 100644 --- a/nannou_osc/Cargo.toml +++ b/nannou_osc/Cargo.toml @@ -11,4 +11,4 @@ homepage = "https://nannou.cc" edition = "2018" [dependencies] -rosc = "0.1" +rosc = "0.10" diff --git a/nannou_osc/src/lib.rs b/nannou_osc/src/lib.rs index 2eb64e6ac..35677f496 100644 --- a/nannou_osc/src/lib.rs +++ b/nannou_osc/src/lib.rs @@ -10,8 +10,9 @@ pub use rosc; pub use self::recv::Receiver; #[doc(inline)] pub use self::rosc::{ - decoder, encoder, OscBundle as Bundle, OscColor as Color, OscError as Error, - OscMessage as Message, OscMidiMessage as MidiMessage, OscType as Type, + address, decoder, encoder, OscArray as Array, OscBundle as Bundle, OscColor as Color, + OscError as Error, OscMessage as Message, OscMidiMessage as MidiMessage, OscTime as Time, + OscTimeError as TimeError, OscType as Type, }; pub use self::send::Sender; @@ -121,7 +122,6 @@ where A: Into, { let addr = addr.into(); - let args = Some(args); Message { addr, args } } @@ -129,7 +129,7 @@ where /// /// Returns an `Error` if the slice does not contain a valid OSC packet. pub fn decode(bytes: &[u8]) -> Result { - rosc::decoder::decode(bytes).map(|p| p.into()) + rosc::decoder::decode_udp(bytes).map(|(_bytes, p)| p.into()) } /// Encodes the given `Packet` into a `Vec` of bytes.