You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exporter/src/main.rs
+7-13Lines changed: 7 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,7 @@ struct SizeOpt {
41
41
#[derive(Debug,Clone,Copy)]
42
42
enumFrameSelection{
43
43
All,
44
-
One,
45
-
Count(u32),
44
+
Count(NonZeroUsize),
46
45
}
47
46
48
47
implFromStrforFrameSelection{
@@ -53,11 +52,7 @@ impl FromStr for FrameSelection {
53
52
if s_lower == "all"{
54
53
Ok(FrameSelection::All)
55
54
}elseifletOk(n) = s.parse::<u32>(){
56
-
if n == 1{
57
-
Ok(FrameSelection::One)
58
-
}else{
59
-
Ok(FrameSelection::Count(n))
60
-
}
55
+
Ok(FrameSelection::Count(n))
61
56
}else{
62
57
Err(format!("Invalid value for --frames: {s}"))
63
58
}
@@ -119,7 +114,7 @@ struct Opt {
119
114
fntake_screenshot(
120
115
descriptors:Arc<Descriptors>,
121
116
swf_path:&Path,
122
-
frames:FrameSelection,
117
+
frames:FrameSelection,// TODO Figure out a way to get framecount before calling take_screenshot, so that we can have accurate progress bars when using --frames all
_ => ProgressBar::new_spinner(),// TODO Once we figure out a way to get framecount before calling take_screenshot, then this can be changed back to a progress bar when using --frames all
0 commit comments