Radish alpha
r
rad:z2UcCU1LgMshWvXj6hXSDDrwB8q8M
Radicle Job Collaborative Object
Radicle
Git
fix: make `Transaction` private
Fintan Halpenny committed 10 months ago
commit f9d9f1f1826daa25f29ba618f98d2a0cf9ea28b6
parent 2475066
1 file changed +5 -5
modified src/lib.rs
@@ -679,7 +679,7 @@ where
    }

    /// Apply COB operations to a `JobMut`.
-
    pub fn transaction<G, F>(
+
    fn transaction<G, F>(
        &mut self,
        message: &str,
        signer: &Device<G>,
@@ -701,7 +701,7 @@ where

/// An update for the `Job` COB. This applies a change to the
/// in-memory computed representation of the COB.
-
pub struct Transaction<R: ReadRepository>(store::Transaction<Job, R>);
+
struct Transaction<R: ReadRepository>(store::Transaction<Job, R>);

impl<R> From<store::Transaction<Job, R>> for Transaction<R>
where
@@ -755,17 +755,17 @@ where
    R: ReadRepository,
{
    /// Add a request operation to the transaction.
-
    pub fn request(&mut self, oid: Oid) -> Result<(), store::Error> {
+
    fn request(&mut self, oid: Oid) -> Result<(), store::Error> {
        self.0.push(Action::Request { oid })
    }

    /// Add a new `Run` to a transaction.
-
    pub fn run(&mut self, uuid: Uuid, log: Url) -> Result<(), store::Error> {
+
    fn run(&mut self, uuid: Uuid, log: Url) -> Result<(), store::Error> {
        self.0.push(Action::Run { uuid, log })
    }

    /// Mark a run as finished.
-
    pub fn finish(&mut self, uuid: Uuid, reason: Reason) -> Result<(), store::Error> {
+
    fn finish(&mut self, uuid: Uuid, reason: Reason) -> Result<(), store::Error> {
        self.0.push(Action::Finished { uuid, reason })
    }
}