From 9d34cb6e1cf60b008cf5ddf2f68005caa25fb611 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 25 Nov 2020 09:41:02 -0600 Subject: [PATCH] Implement Extends for Base --- CHANGELOG.md | 3 +++ Cargo.toml | 2 +- src/base.rs | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b1e1b5..c0f73fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Unreleased +# 0.7.0-alpha.7 +- implement Extends for Base + # 0.7.0-alpha.6 - Add Actor and AsApActor impls for ApObject diff --git a/Cargo.toml b/Cargo.toml index c7f78c9..53393cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "activitystreams" description = "A set of core types and traits for activitystreams data" -version = "0.7.0-alpha.6" +version = "0.7.0-alpha.7" license = "GPL-3.0" authors = ["asonix "] repository = "https://git.asonix.dog/Aardwolf/activitystreams" diff --git a/src/base.rs b/src/base.rs index c968f1e..60cae4b 100644 --- a/src/base.rs +++ b/src/base.rs @@ -1850,6 +1850,18 @@ impl AsBase for Base { } } +impl Extends for Base { + type Error = std::convert::Infallible; + + fn extends(base: Base) -> Result { + Ok(base) + } + + fn retracts(self) -> Result, Self::Error> { + Ok(self) + } +} + impl ExtendsExt for T where T: Extends,