Skip to content

Commit f895168

Browse files
committed
allow !kalc-lib for egui and fix clippy
1 parent 8283494 commit f895168

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

src/app.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,7 @@ impl App {
134134
}
135135
}
136136
#[cfg(not(feature = "kalc-lib"))]
137-
pub(crate) fn new(function: String) -> Self {
138-
#[cfg(feature = "bincode")]
139-
let mut function = function;
140-
#[cfg(feature = "bincode")]
141-
let tiny = (&function).try_into().ok();
142-
#[cfg(feature = "bincode")]
143-
if tiny.is_some() {
144-
function = String::new()
145-
}
137+
pub(crate) fn new(_function: String) -> Self {
146138
let options = crate::data::Options::default();
147139
let mut data = Data {
148140
data: vec![Some(crate::data::Plot {
@@ -189,12 +181,13 @@ impl App {
189181
tiny,
190182
#[cfg(feature = "wasm")]
191183
window: None,
184+
#[cfg(any(feature = "skia", feature = "tiny-skia"))]
192185
#[cfg(not(feature = "wasm"))]
193186
surface_state: None,
194187
#[cfg(any(feature = "skia", feature = "tiny-skia"))]
195188
input_state: rupl::types::InputState::default(),
196189
#[cfg(any(feature = "skia", feature = "tiny-skia"))]
197-
name: function,
190+
name: _function,
198191
#[cfg(any(feature = "skia", feature = "tiny-skia"))]
199192
touch_positions: Default::default(),
200193
#[cfg(any(feature = "skia", feature = "tiny-skia"))]

0 commit comments

Comments
 (0)