Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xml-rs"
version = "0.1.10"
version = "0.1.11"
authors = ["Vladimir Matveev <[email protected]>"]
license = "MIT"
description = "An XML library in pure Rust"
Expand Down
6 changes: 3 additions & 3 deletions src/util.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::borrow::{BorrowFrom, ToOwned, IntoCow};

pub trait OptionBorrowExt<Sized? T, U> where T: BorrowFrom<U> {
pub trait OptionBorrowExt<T: ?Sized, U> where T: BorrowFrom<U> {
fn borrow_internals(&self) -> Option<&T>;
}

impl<Sized? T, U> OptionBorrowExt<T, U> for Option<U> where T: BorrowFrom<U> {
impl<T: ?Sized, U> OptionBorrowExt<T, U> for Option<U> where T: BorrowFrom<U> {
fn borrow_internals(&self) -> Option<&T> {
self.as_ref().map(BorrowFrom::borrow_from)
}
Expand All @@ -14,7 +14,7 @@ pub trait IntoOwned<O> {
fn into_owned(self) -> O;
}

impl<'a, O, Sized? T, S> IntoOwned<O> for S where S: IntoCow<'a, O, T>, T: ToOwned<O> + 'a {
impl<'a, O, T: ?Sized, S> IntoOwned<O> for S where S: IntoCow<'a, O, T>, T: ToOwned<O> + 'a {
#[inline]
fn into_owned(self) -> O {
self.into_cow().into_owned()
Expand Down