From 9e9b281c6d87831d2774e66d85021a63f8e779d1 Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 3 Sep 2023 20:23:52 +0000 Subject: [PATCH] `SingularResolution` for `Point` to `rcore` --- src/rcore/singular.rs | 12 ++++++++++++ src/rstd/singular.rs | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/rcore/singular.rs b/src/rcore/singular.rs index 3bba249..81a44f0 100644 --- a/src/rcore/singular.rs +++ b/src/rcore/singular.rs @@ -5,3 +5,15 @@ pub trait SingularResolution<'a, Ctx: Context<'a>>: 'a + Send + Sync { fn s_hash(&self) -> Hash; } + +impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> SingularResolution<'a, Ctx> + for Point<'a, Ctx, A> +{ + fn singular(self: Arc) -> HashResolution<'a, Ctx> { + self.origin.ref_resolve_bytes() + } + + fn s_hash(&self) -> Hash { + self.point + } +} diff --git a/src/rstd/singular.rs b/src/rstd/singular.rs index d96739f..95a542e 100644 --- a/src/rstd/singular.rs +++ b/src/rstd/singular.rs @@ -2,18 +2,6 @@ use crate::func::context::*; use super::*; -impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> SingularResolution<'a, Ctx> - for Point<'a, Ctx, A> -{ - fn singular(self: Arc) -> HashResolution<'a, Ctx> { - self.origin.ref_resolve_bytes() - } - - fn s_hash(&self) -> Hash { - self.point - } -} - /// ```rust /// # use radn::rcore::Context; /// # use radn::rcore::Factory;