No uses yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
"flexi_logger",
"fs2",
"glob 0.3.0",
- "htmlescape",
"index_vec",
"inventory",
"lazy-init",
"derive_more",
"extend",
"fehler",
+ "htmlescape",
"if_chain",
"itertools",
"num-derive",
fehler="1"
fs2="0.4"
glob="0.3"
-htmlescape="0.3"
inventory="0.1"
lazy-init="0.5"
lazy_static="1"
arrayvec = "0.5"
derive_more = "0.99"
extend="1"
+htmlescape="0.3"
if_chain = "1"
itertools="0.10"
num-derive="0.3"
pub use arrayvec;
pub use derive_more;
pub use extend;
+pub use htmlescape;
pub use if_chain;
pub use itertools;
pub use num_derive;
pub mod prelude;
pub mod geometry;
+pub mod html;
pub mod zcoord;
pub mod misc;
// SPDX-License-Identifier: AGPL-3.0-or-later
// There is NO WARRANTY.
+pub use std::borrow::Borrow;
pub use std::cmp::{max, Ordering};
pub use std::convert::{TryFrom, TryInto};
pub use std::fmt::{self, Debug, Display, Formatter};
pub use std::hash::{Hash, Hasher};
pub use std::iter;
+pub use std::mem;
pub use std::num::{TryFromIntError, Wrapping};
+pub use std::ops::{Deref, DerefMut, Index, IndexMut};
pub use std::str;
pub use std::str::FromStr;
pub use arrayvec::ArrayVec;
pub use derive_more::*;
+pub use extend::ext;
pub use fehler::{throw, throws};
pub use if_chain::if_chain;
pub use itertools::izip;
pub use thiserror::Error;
pub use void::Void;
+pub use crate::html::*;
+
pub use crate::geometry::{CoordinateOverflow, PosC};
+pub use crate::{hformat, hformat_as_display, hwrite};
pub use crate::misc::default;
pub use crate::misc::display_as_debug;
update_links(cs,ag,ig, |ig_links|{
let mut new_links: LinksTable = (**ig_links).clone();
let url: Url = (&url).try_into()?;
- let show: Html = (kind, url.as_str()).into();
+ let show: Html = (kind, url.as_str()).to_html();
new_links[kind] = Some(url.into_string());
let new_links = Arc::new(new_links);
*ig_links = new_links.clone();
fn link_a_href(k: &HtmlStr, v: &str) -> Html {
hformat!("<a href={}>{}</a>", v, k)
}
-impl From<(LinkKind, &str)> for Html {
- fn from((k, v): (LinkKind, &str)) -> Html {
+#[ext(pub)]
+impl (LinkKind, &str) {
+ fn to_html(self) -> Html {
+ let (k, v) = self;
link_a_href(&k.to_html(), v)
}
}
let mut s = links.iter()
.filter_map(|(k,v)| {
let v = v.as_ref()?;
- Some(Html::from((k, v.as_str())))
+ Some((k, v.as_str()).to_html())
})
.chain(iter::once(
link_a_href(Html::lit("Shapelib").into(), "/_/shapelib.html")
pub use flexi_logger;
pub use fs2;
pub use glob;
-pub use htmlescape;
pub use index_vec;
pub use lazy_init;
pub use lazy_static;
pub mod error;
pub mod gamestate;
pub mod global;
-pub mod html;
pub mod hand;
pub mod hidden;
pub mod keydata;
use crate::imports::*;
pub use crate::imports::{flexi_logger, thiserror};
-
pub use crate::imports::serde_json;
+pub use otter_base::prelude::*;
+
pub use std::any::Any;
-pub use std::borrow::Borrow;
pub use std::borrow::Cow;
pub use std::cmp::{self, max, min, Ordering};
pub use std::collections::VecDeque;
pub use std::iter;
pub use std::iter::repeat_with;
pub use std::marker::PhantomData;
-pub use std::mem;
pub use std::num::{NonZeroUsize, TryFromIntError, Wrapping};
-pub use std::ops::{Deref, DerefMut, Index, IndexMut};
pub use std::os::linux::fs::MetadataExt; // todo why linux for st_mode??
pub use std::os::unix;
pub use std::os::unix::ffi::OsStrExt;
pub use either::{Either, Left, Right};
pub use enum_dispatch::enum_dispatch;
pub use enum_map::{Enum, EnumMap};
-pub use extend::ext;
pub use fehler::{throw, throws};
pub use flexi_logger::LogSpecification;
pub use fs2::FileExt;
pub use crate::{deref_to_field, deref_to_field_mut};
pub use crate::ensure_eq;
pub use crate::from_instance_lock_error;
-pub use crate::{hformat, hformat_as_display, hwrite};
pub use crate::matches_doesnot;
pub use crate::trace_dbg;
pub use crate::gamestate::*;
pub use crate::global::*;
pub use crate::hidden::*;
-pub use crate::html::*;
pub use crate::keydata::*;
pub use crate::mgmtchannel::*;
pub use crate::nwtemplates;
use thiserror::Error;
use otter_base::geometry::{Coord,Pos};
+use otter_base::hformat_as_display;
use otter_base::misc::display_as_debug;
use crate::accounts::AccountName;
use crate::error::UnsupportedColourSpec;
use crate::gamestate::PieceSpec;
-use crate::hformat_as_display;
use crate::prelude::default;
pub use imp::PlayerAccessSpec;