Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the lift module #607

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 3, 2023

  1. Rename Liftable to Lift

    In Rust, by convention, traits with a single method are named the same
    as the method. `Liftable` should be called `Lift`, make it so.
    tcharding committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    b71f55f View commit details
    Browse the repository at this point in the history
  2. Change semantic::Policy to Lifted

    Observe:
    
    - The semantic/abstract policy is a rust-miniscript thing but the policy
      language (`concrete::Policy`) is a general miniscript thing.
    - The `semantic::Policy` can be created by lifting more than just a
      concrete policy (eg, a descriptor).
    
    Do the following:
    
    - Move `src/policy/semantic.rs` to `src/lift/lifted.rs` (leaving the
      type as `Policy`).
    - Move the contents of `src/policy/mod.rs` (excl. tests/benches) to
      `src/lift/mod.rs`.
    - Add a re-export `lift::lifted::Policy as Lifted` and use it in other
      parts of the code base.
    
    Note, the idea to keep the `lifted::Policy` as is and re-export helps
    keep this patch smaller but also gives some choice to how the type is
    used
    
    - `use crate::lift::Liftded` coupled with usage of `Lifted`.
    - `use crate::lift::lifted` coupled with usage of `lifted::Policy`
    
    We can the do a rename later if deemed appropriate.
    tcharding committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    ddc961e View commit details
    Browse the repository at this point in the history