Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cargo.toml files to use recent features #131

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 1.2.0 Alpha 1

### Minimum Rust Version

Now using edition 2021

## Version 1.1.0

*Same code as version 1.1.0-beta.1*
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ members = [

# https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2
resolver = "2"

[workspace.lints.rust]
unsafe_code = "forbid"
missing_docs = "warn"
7 changes: 5 additions & 2 deletions rusqlite_migration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "rusqlite_migration"
version = "1.1.0"
version = "1.2.0-alpha.1"
authors = ["Clément Joly <foss@131719.xyz>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
description = "Simple schema migration library for rusqlite using user_version instead of an SQL table to maintain the current schema version."
keywords = ["rusqlite", "sqlite", "user_version", "database", "migration"]
Expand All @@ -19,6 +19,9 @@ rust-version = "1.70"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[features]
default = []
### Enable support for async migrations with the use of `tokio-rusqlite`
Expand Down
2 changes: 2 additions & 0 deletions rusqlite_migration/benches/criterion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ limitations under the License.

*/

//! Benchmarks using criterion

use criterion::criterion_main;

#[cfg(feature = "from-directory")]
Expand Down
6 changes: 3 additions & 3 deletions rusqlite_migration/benches/iai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ limitations under the License.

*/

//! Why criterion and iai? It’s actually recommended:
//! https://bheisler.github.io/criterion.rs/book/iai/comparison.html

use std::iter::FromIterator;

use iai::black_box;
use rusqlite::Connection;
use rusqlite_migration::{Migrations, M};

// Why criterion and iai? It’s actually recommended:
// https://bheisler.github.io/criterion.rs/book/iai/comparison.html

fn upward(i: u64) {
let sql_migrations = (0..=i)
.map(|i| {
Expand Down
2 changes: 2 additions & 0 deletions rusqlite_migration/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Insert the readme as documentation of the crate

use std::{
env,
error::Error,
Expand Down
2 changes: 0 additions & 2 deletions rusqlite_migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ limitations under the License.
*/

#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![forbid(unsafe_code)]
#![warn(missing_docs)]
// The doc is extracted from the README.md file at build time
#![doc = include_str!(concat!(env!("OUT_DIR"), "/readme_for_rustdoc.md"))]

Expand Down
6 changes: 5 additions & 1 deletion rusqlite_migration_tokio_async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
name = "rusqlite_migration_tokio_async"
version = "0.0.1-alpha1"
authors = ["Clément Joly <foss@131719.xyz>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
description = "Simple schema migration library for rusqlite using user_version instead of an SQL table to maintain the current schema version."
keywords = ["rusqlite", "sqlite", "user_version", "database", "migration"]
categories = ["database"]
readme = "README.md"
homepage = "https://cj.rs/rusqlite_migration"
repository = "https://github.com/cljoly/rusqlite_migration/tree/master/rusqlite_migration_tokio_async"

[lints]
workspace = true

3 changes: 3 additions & 0 deletions rusqlite_migration_tokio_async/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Might eventually hold the async code

/// Add
pub fn add(left: usize, right: usize) -> usize {
left + right
}
Expand Down
Loading