automatic cargo CI changes
This commit is contained in:
parent
5ad5cd39ed
commit
1589d6089a
|
@ -3,9 +3,8 @@ use std::fmt::Display;
|
||||||
use comfy_table::presets::UTF8_FULL_CONDENSED;
|
use comfy_table::presets::UTF8_FULL_CONDENSED;
|
||||||
use comfy_table::Table;
|
use comfy_table::Table;
|
||||||
use console::{style, Color};
|
use console::{style, Color};
|
||||||
|
use dialoguer::BasicHistory;
|
||||||
use dialoguer::{theme::ColorfulTheme, Completion, Input};
|
use dialoguer::{theme::ColorfulTheme, Completion, Input};
|
||||||
use dialoguer::{BasicHistory, History};
|
|
||||||
use libpt::log::{info, warn};
|
|
||||||
|
|
||||||
use crate::models::{self, Post};
|
use crate::models::{self, Post};
|
||||||
|
|
||||||
|
@ -123,6 +122,6 @@ pub(crate) fn borderprint(content: impl ToString, color: Option<Color>) {
|
||||||
.add_row(vec![content.to_string()]);
|
.add_row(vec![content.to_string()]);
|
||||||
match color {
|
match color {
|
||||||
Some(c) => println!("{}", style(table).fg(c)),
|
Some(c) => println!("{}", style(table).fg(c)),
|
||||||
None => println!("{table}")
|
None => println!("{table}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,17 @@
|
||||||
|
pub mod cli;
|
||||||
pub mod models;
|
pub mod models;
|
||||||
pub mod schema;
|
pub mod schema;
|
||||||
pub mod cli;
|
|
||||||
|
|
||||||
use self::schema::posts::dsl::*;
|
use self::schema::posts::dsl::*;
|
||||||
|
|
||||||
use std::io::Write;
|
use std::env;
|
||||||
use std::{env, io};
|
|
||||||
|
|
||||||
use colored::Colorize;
|
|
||||||
use dialoguer::Input;
|
|
||||||
use diesel::prelude::*;
|
use diesel::prelude::*;
|
||||||
use diesel::sqlite::SqliteConnection;
|
use diesel::sqlite::SqliteConnection;
|
||||||
|
|
||||||
use dotenvy::dotenv;
|
use dotenvy::dotenv;
|
||||||
|
|
||||||
use libpt::log::{error, info, warn};
|
use libpt::log::error;
|
||||||
|
|
||||||
pub fn establish_connection() -> anyhow::Result<SqliteConnection> {
|
pub fn establish_connection() -> anyhow::Result<SqliteConnection> {
|
||||||
dotenv()?;
|
dotenv()?;
|
||||||
|
@ -35,4 +32,3 @@ pub fn load_relevant_posts(conn: &mut SqliteConnection) -> anyhow::Result<Vec<mo
|
||||||
.select(models::Post::as_select())
|
.select(models::Post::as_select())
|
||||||
.load(conn)?)
|
.load(conn)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use std::fmt::Display;
|
|
||||||
use std::io::{self, Read, Write};
|
use std::io::{self, Read, Write};
|
||||||
|
|
||||||
use dialoguer::Confirm;
|
use dialoguer::Confirm;
|
||||||
|
|
Loading…
Reference in New Issue