Skip to content

Commit

Permalink
assume data slice has length of 1
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Nov 7, 2023
1 parent 190445d commit 819e26a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,13 @@ impl Window {
let vec_info = ngspice.vector_info(&vec_name)?;
match vec_info.data {
ComplexSlice::Real(real) => {
debug_assert_eq!(real.len(), 1);

writeln!(text, "{}: {}", vec_name, real[0]).unwrap();
}
ComplexSlice::Complex(complex) => {
debug_assert_eq!(complex.len(), 1);

writeln!(
text,
"{}: {} + {}j",
Expand Down

0 comments on commit 819e26a

Please sign in to comment.