Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zv: Add missing From implementations for Value::Str #1238

Merged
merged 2 commits into from
Feb 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion zvariant/src/into_value.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::HashMap, hash::BuildHasher};
use std::{borrow::Cow, collections::HashMap, hash::BuildHasher, sync::Arc};

#[cfg(feature = "gvariant")]
use crate::Maybe;
Expand Down Expand Up @@ -49,6 +49,9 @@ into_value_from_both!(i64, I64);
into_value_from_both!(f32, F64);
into_value_from_both!(f64, F64);

into_value!(Arc<str>, Str);
into_value!(Cow<'a, str>, Str);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for future ref, this is not bug fix but rather a new feature (despite its importance) so ✨ would have been a better emoji. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, thanks :)


into_value_from_both!(&'a str, Str);
into_value_from_both!(Str<'a>, Str);
into_value_from_both!(ObjectPath<'a>, ObjectPath);
Expand Down