Refactor SassError to live inside error module
This commit is contained in:
parent
72ae82b6c5
commit
ff0b05d74a
@ -1,6 +1,7 @@
|
|||||||
//! # Convert from SCSS AST to CSS
|
//! # Convert from SCSS AST to CSS
|
||||||
use crate::atrule::AtRule;
|
use crate::atrule::AtRule;
|
||||||
use crate::{RuleSet, SassResult, Selector, Stmt, Style, StyleSheet};
|
use crate::error::SassResult;
|
||||||
|
use crate::{RuleSet, Selector, Stmt, Style, StyleSheet};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@ use std::fmt::{self, Display};
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::string::FromUtf8Error;
|
use std::string::FromUtf8Error;
|
||||||
|
|
||||||
|
pub type SassResult<T> = Result<T, SassError>;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct SassError {
|
pub struct SassError {
|
||||||
message: String,
|
message: String,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
use crate::{RuleSet, SassResult, Stmt, StyleSheet};
|
use crate::error::SassResult;
|
||||||
|
use crate::{RuleSet, Stmt, StyleSheet};
|
||||||
|
|
||||||
pub(crate) struct PrettyPrinter<W: Write> {
|
pub(crate) struct PrettyPrinter<W: Write> {
|
||||||
buf: W,
|
buf: W,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use crate::common::Scope;
|
use crate::common::Scope;
|
||||||
use crate::{SassResult, Stmt, StyleSheet};
|
use crate::error::SassResult;
|
||||||
|
use crate::{Stmt, StyleSheet};
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ use std::path::Path;
|
|||||||
use crate::atrule::{AtRule, AtRuleKind};
|
use crate::atrule::{AtRule, AtRuleKind};
|
||||||
use crate::common::{Keyword, Op, Pos, Scope, Symbol, Whitespace};
|
use crate::common::{Keyword, Op, Pos, Scope, Symbol, Whitespace};
|
||||||
use crate::css::Css;
|
use crate::css::Css;
|
||||||
use crate::error::SassError;
|
use crate::error::{SassError, SassResult};
|
||||||
use crate::format::PrettyPrinter;
|
use crate::format::PrettyPrinter;
|
||||||
use crate::function::Function;
|
use crate::function::Function;
|
||||||
use crate::imports::import;
|
use crate::imports::import;
|
||||||
@ -88,8 +88,6 @@ mod units;
|
|||||||
mod utils;
|
mod utils;
|
||||||
mod value;
|
mod value;
|
||||||
|
|
||||||
pub type SassResult<T> = Result<T, SassError>;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
pub(crate) struct Token {
|
pub(crate) struct Token {
|
||||||
pos: Pos,
|
pos: Pos,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user