mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-29 11:13:43 +01:00
Fix warnings for --no-default-features mode
This commit is contained in:
parent
b76f5e72d4
commit
12eee0c590
@ -5,7 +5,7 @@ use crate::config::Config;
|
|||||||
#[cfg(feature = "paging")]
|
#[cfg(feature = "paging")]
|
||||||
use crate::config::PagingMode;
|
use crate::config::PagingMode;
|
||||||
use crate::error::*;
|
use crate::error::*;
|
||||||
use crate::input::{Input, InputKind, InputReader, OpenedInput};
|
use crate::input::{Input, InputReader, OpenedInput};
|
||||||
use crate::line_range::{LineRanges, RangeCheckResult};
|
use crate::line_range::{LineRanges, RangeCheckResult};
|
||||||
use crate::output::OutputType;
|
use crate::output::OutputType;
|
||||||
use crate::printer::{InteractivePrinter, Printer, SimplePrinter};
|
use crate::printer::{InteractivePrinter, Printer, SimplePrinter};
|
||||||
@ -33,6 +33,7 @@ impl<'b> Controller<'b> {
|
|||||||
|
|
||||||
#[cfg(feature = "paging")]
|
#[cfg(feature = "paging")]
|
||||||
{
|
{
|
||||||
|
use crate::input::InputKind;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
// Do not launch the pager if NONE of the input files exist
|
// Do not launch the pager if NONE of the input files exist
|
||||||
|
@ -26,7 +26,7 @@ use crate::decorations::{Decoration, GridBorderDecoration, LineNumberDecoration}
|
|||||||
#[cfg(feature = "git")]
|
#[cfg(feature = "git")]
|
||||||
use crate::diff::{get_git_diff, LineChanges};
|
use crate::diff::{get_git_diff, LineChanges};
|
||||||
use crate::error::*;
|
use crate::error::*;
|
||||||
use crate::input::{OpenedInput, OpenedInputKind};
|
use crate::input::OpenedInput;
|
||||||
use crate::line_range::RangeCheckResult;
|
use crate::line_range::RangeCheckResult;
|
||||||
use crate::preprocessor::{expand_tabs, replace_nonprintable};
|
use crate::preprocessor::{expand_tabs, replace_nonprintable};
|
||||||
use crate::terminal::{as_terminal_escaped, to_ansi_color};
|
use crate::terminal::{as_terminal_escaped, to_ansi_color};
|
||||||
@ -158,6 +158,8 @@ impl<'a> InteractivePrinter<'a> {
|
|||||||
// Get the Git modifications
|
// Get the Git modifications
|
||||||
#[cfg(feature = "git")]
|
#[cfg(feature = "git")]
|
||||||
{
|
{
|
||||||
|
use crate::input::OpenedInputKind;
|
||||||
|
|
||||||
if config.style_components.changes() {
|
if config.style_components.changes() {
|
||||||
if let OpenedInputKind::OrdinaryFile(ref path) = input.kind {
|
if let OpenedInputKind::OrdinaryFile(ref path) = input.kind {
|
||||||
line_changes = get_git_diff(path);
|
line_changes = get_git_diff(path);
|
||||||
|
Loading…
Reference in New Issue
Block a user