mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-31 02:01:05 +00:00
Rename error module
This commit is contained in:
parent
5f826419d1
commit
702cb198da
@ -9,7 +9,7 @@ use syntect::highlighting::{Theme, ThemeSet};
|
||||
use syntect::parsing::{SyntaxReference, SyntaxSet, SyntaxSetBuilder};
|
||||
|
||||
use crate::assets_metadata::AssetsMetadata;
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
use crate::input::{InputReader, OpenedInput, OpenedInputKind};
|
||||
use crate::syntax_mapping::{MappingTarget, SyntaxMapping};
|
||||
|
||||
|
@ -5,7 +5,7 @@ use std::time::SystemTime;
|
||||
use semver::Version;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct AssetsMetadata {
|
||||
|
@ -16,7 +16,7 @@ use console::Term;
|
||||
use bat::{
|
||||
assets::HighlightingAssets,
|
||||
config::{Config, PagingMode},
|
||||
errors::*,
|
||||
error::*,
|
||||
input::Input,
|
||||
line_range::{HighlightedLineRanges, LineRange, LineRanges},
|
||||
style::{StyleComponent, StyleComponents},
|
||||
|
@ -7,7 +7,7 @@ use crate::directories::PROJECT_DIRS;
|
||||
|
||||
use bat::assets::HighlightingAssets;
|
||||
use bat::assets_metadata::AssetsMetadata;
|
||||
use bat::errors::*;
|
||||
use bat::error::*;
|
||||
|
||||
pub fn config_dir() -> Cow<'static, str> {
|
||||
PROJECT_DIRS.config_dir().to_string_lossy()
|
||||
|
@ -14,7 +14,7 @@ pub fn config_file() -> PathBuf {
|
||||
.unwrap_or_else(|| PROJECT_DIRS.config_dir().join("config"))
|
||||
}
|
||||
|
||||
pub fn generate_config_file() -> bat::errors::Result<()> {
|
||||
pub fn generate_config_file() -> bat::error::Result<()> {
|
||||
let config_file = config_file();
|
||||
if config_file.exists() {
|
||||
println!(
|
||||
|
@ -29,7 +29,7 @@ use bat::{
|
||||
assets::HighlightingAssets,
|
||||
config::Config,
|
||||
controller::Controller,
|
||||
errors::*,
|
||||
error::*,
|
||||
input::Input,
|
||||
style::{StyleComponent, StyleComponents},
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ use crate::assets::HighlightingAssets;
|
||||
use crate::config::Config;
|
||||
#[cfg(feature = "paging")]
|
||||
use crate::config::PagingMode;
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
use crate::input::{Input, InputKind, InputReader, OpenedInput};
|
||||
use crate::line_range::{LineRanges, RangeCheckResult};
|
||||
use crate::output::OutputType;
|
||||
|
@ -4,7 +4,7 @@ use std::io::{self, BufRead, BufReader, Read};
|
||||
|
||||
use content_inspector::{self, ContentType};
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
|
||||
const THEME_PREVIEW_FILE: &[u8] = include_bytes!("../assets/theme_preview.rs");
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
//! .input_from_bytes(b"<span style=\"color: #ff00cc\">Hello world!</span>\n")
|
||||
//! .language("html")
|
||||
//! .print()
|
||||
//! .expect("no errors");
|
||||
//! .unwrap();
|
||||
//! ```
|
||||
|
||||
pub mod assets;
|
||||
@ -24,7 +24,7 @@ pub mod config;
|
||||
pub mod controller;
|
||||
mod decorations;
|
||||
mod diff;
|
||||
pub mod errors;
|
||||
pub mod error;
|
||||
pub mod input;
|
||||
mod less;
|
||||
pub mod line_range;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct LineRange {
|
||||
|
@ -4,7 +4,7 @@ use std::process::Child;
|
||||
|
||||
#[cfg(feature = "paging")]
|
||||
use crate::config::PagingMode;
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
#[cfg(feature = "paging")]
|
||||
use crate::less::retrieve_less_version;
|
||||
|
||||
|
@ -7,7 +7,7 @@ use crate::{
|
||||
assets::HighlightingAssets,
|
||||
config::Config,
|
||||
controller::Controller,
|
||||
errors::Result,
|
||||
error::Result,
|
||||
input::Input,
|
||||
line_range::{HighlightedLineRanges, LineRanges},
|
||||
style::{StyleComponent, StyleComponents},
|
||||
|
@ -25,7 +25,7 @@ use crate::decorations::LineChangesDecoration;
|
||||
use crate::decorations::{Decoration, GridBorderDecoration, LineNumberDecoration};
|
||||
#[cfg(feature = "git")]
|
||||
use crate::diff::{get_git_diff, LineChanges};
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
use crate::input::{OpenedInput, OpenedInputKind};
|
||||
use crate::line_range::RangeCheckResult;
|
||||
use crate::preprocessor::{expand_tabs, replace_nonprintable};
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::collections::HashSet;
|
||||
use std::str::FromStr;
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::error::*;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)]
|
||||
pub enum StyleComponent {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::path::Path;
|
||||
|
||||
use crate::errors::Result;
|
||||
use crate::error::Result;
|
||||
|
||||
use globset::{Candidate, GlobBuilder, GlobMatcher};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user