Skip to content

Commit

Permalink
fix spice_vdivider example
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanku committed Nov 10, 2023
1 parent 06237f5 commit c2f62f4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/spice_vdivider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
use spice::Spice;
use substrate::block::Block;
use substrate::io::{
InOut, Io, Output, SchematicType, Signal, TwoTerminalIo, TwoTerminalIoSchematic,
};
use substrate::io::{InOut, Io, Output, SchematicType, Signal};
use substrate::schematic::primitives::Resistor;
use substrate::schematic::{CellBuilder, ExportsNestedData, Schematic};
// end-code-snippet imports
Expand All @@ -21,7 +19,7 @@ pub struct VdividerIo {

// begin-code-snippet vdivider-struct
#[derive(Serialize, Deserialize, Block, Debug, Copy, Clone, Hash, PartialEq, Eq)]
#[substrate(io = "VdividerIo")]
#[substrate(io = "VdividerIo", kind = "Cell")]
pub struct Vdivider {
/// The top resistance.
pub r1: Decimal,
Expand Down Expand Up @@ -71,7 +69,7 @@ mod tests {
));
std::fs::create_dir_all(&work_dir).expect("failed to create working directory");

let mut ctx = Context::new();
let ctx = Context::new();
let raw_lib = ctx
.export_scir::<Spice, _>(Vdivider {
r1: dec!(100),
Expand Down

0 comments on commit c2f62f4

Please sign in to comment.