pub type SvgAttrs = Vec<(HtmlLit,Html)>;
pub fn space_table_attrs(table_size: PosC<f64>) -> SvgAttrs {
- let PosC { coords: [x, y] } = table_size.into();
+ let PosC { coords: [x, y] } = table_size;
vec![
(Html::lit("viewBox"), hformat!("0 0 {} {}", x, y) ),
(Html::lit("width" ), (SVG_SCALE * x).to_html() ),
for lt in s.chunks(TEXT_PER_LIMB) {
if !lt[0..DIGITS_PER_LIMB].iter().all(
|c: &u8| {
- (b'0'..=b'9').contains(&c) ||
- (b'a'..=b'v').contains(&c)
+ (b'0'..=b'9').contains(c) ||
+ (b'a'..=b'v').contains(c)
}) { throw!(ParseError) }
match lt[DIGITS_PER_LIMB..] {
[] | [b'_'] => (),
#[wasm_bindgen]
impl ZCoordIterator {
+ #[allow(clippy::should_implement_trait)]
+ // ^ Yes, but WASM can't call the trait method
pub fn next(&mut self) -> JsValue {
let packed = match self.0.next() {
None => return JsValue::NULL,