remove helpers file
This commit is contained in:
parent
d49dc042de
commit
c6ada504e4
3 changed files with 19 additions and 20 deletions
|
@ -1,18 +0,0 @@
|
||||||
use sciter::{Window, Host, Element};
|
|
||||||
use std::rc::Rc;
|
|
||||||
use std::ops::Deref;
|
|
||||||
|
|
||||||
|
|
||||||
fn get_root(frame: Window) -> Element {
|
|
||||||
return frame.get_host().deref().get_root().expect("Failed to get root of window");
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn sciter_start(source: String) -> Element {
|
|
||||||
let mut frame = Window::new();
|
|
||||||
frame.load_html(&source.as_bytes(), None);
|
|
||||||
return get_root(frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_html(element: Element) -> String {
|
|
||||||
return String::from_utf8(element.get_html(true)).expect("Failed to get HTML from element");
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
use renderers::helpers::{sciter_start, get_html};
|
use renderers::{sciter_start, get_html};
|
||||||
use config::Config;
|
use config::Config;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,23 @@
|
||||||
use config::Config;
|
use config::Config;
|
||||||
|
|
||||||
mod helpers;
|
use sciter::{Window, Host, Element};
|
||||||
|
use std::rc::Rc;
|
||||||
|
use std::ops::Deref;
|
||||||
|
|
||||||
pub mod html_cleanup;
|
pub mod html_cleanup;
|
||||||
pub mod strip_blank;
|
pub mod strip_blank;
|
||||||
|
|
||||||
|
|
||||||
|
fn get_root(frame: Window) -> Element {
|
||||||
|
return frame.get_host().deref().get_root().expect("Failed to get root of window");
|
||||||
|
}
|
||||||
|
|
||||||
|
fn sciter_start(source: String) -> Element {
|
||||||
|
let mut frame = Window::new();
|
||||||
|
frame.load_html(&source.as_bytes(), None);
|
||||||
|
return get_root(frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_html(element: Element) -> String {
|
||||||
|
return String::from_utf8(element.get_html(true)).expect("Failed to get HTML from element");
|
||||||
|
}
|
||||||
|
|
Reference in a new issue