Skip to content

Commit

Permalink
Merge #218: Convert Types
Browse files Browse the repository at this point in the history
3b64943 Type: From<Arc<Final>> (Christian Lewe)

Pull request description:

  Convert finalized types to unfinalized ones, for use during unification.

ACKs for top commit:
  apoelstra:
    ACK 3b64943

Tree-SHA512: 78e553a1375acb898f401bc0693a3b4e03baf23b046145193cacd4619d80a769bdb080a76146d2293c0c443f0f04727c8ca77b0f8bd2c95fe76f4aa0fd4e66d7
  • Loading branch information
apoelstra committed May 30, 2024
2 parents 152749d + 3b64943 commit 497b88f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/types/final_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//!
use crate::dag::{Dag, DagLike, NoSharing};
use crate::types::{Bound, Type};
use crate::Tmr;

use std::sync::Arc;
Expand Down Expand Up @@ -226,6 +227,12 @@ impl Final {
}
}

impl From<Arc<Final>> for Type {
fn from(value: Arc<Final>) -> Self {
Type::from(Bound::Complete(value))
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 497b88f

Please sign in to comment.