Cleanup yet more compiler warnings

This commit is contained in:
Jake Howard 2017-12-21 16:27:55 +00:00
parent d170372e5a
commit aff951fa70
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ fn pdf_result<T>(res: WKResult<T>) -> Result<T, String> {
fn create_builder<'a>(config: Config, builder: &'a mut PdfBuilder) -> &'a mut PdfBuilder {
let mut safe_builder = builder.page_size(PageSize::A4).image_quality(100).title(&config.title);
let safe_builder = builder.page_size(PageSize::A4).image_quality(100).title(&config.title);
unsafe {
return safe_builder
.global_setting("useCompression", "true")

View file

@ -1,12 +1,12 @@
use html::{sciter_start, get_html, get_head, find_first};
use html::{sciter_start, get_html, get_head};
use sciter::Element;
use config::Config;
use assets;
fn create_css_element(style: String) -> Element {
let mut style_tag = Element::with_text("style", &style).unwrap();
style_tag.set_attribute("type", "text/css");
style_tag.set_attribute("media", "all");
style_tag.set_attribute("type", "text/css").expect(&format!("Failed to set CSS mimetype for {}", style));
style_tag.set_attribute("media", "all").expect(&format!("Failed to set CSS media type for {}", style));
return style_tag;
}
@ -14,6 +14,6 @@ fn create_css_element(style: String) -> Element {
pub fn static_files(_: Config, input: String) -> Result<String, String> {
let mut root = sciter_start(input);
let mut head = get_head(&mut root);
head.append(&create_css_element(assets::get("style.css")));
head.append(&create_css_element(assets::get("style.css"))).expect("Failed to inject CSS file");
return Ok(get_html(root));
}