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

chore: use stable Rust #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
profile: minimal
components: rustfmt, clippy
- run: cargo install --force cargo-hakari
- run: cargo fmt --all -- --check
- run: cargo +nightly fmt --all -- --check
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
- run: cargo hakari verify

Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.DEFAULT_GOAL := all

.PHONY: all fmt build test

all: fmt

fmt:
(cargo +nightly fmt)

build:
(cargo build)

test:
(cargo test)
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

2 changes: 1 addition & 1 deletion src/hstreamdb-pb/protocol
Submodule protocol updated 1 files
+212 −50 hstream.proto
3 changes: 1 addition & 2 deletions src/hstreamdb/src/channel_provider.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::HashMap;
use std::default::default;
use std::iter::FromIterator;

use hstreamdb_pb::h_stream_api_client::HStreamApiClient;
Expand Down Expand Up @@ -80,7 +79,7 @@ pub struct ChannelProviderSettingsBuilder(ChannelProviderSettings);

impl ChannelProviderSettings {
pub fn builder() -> ChannelProviderSettingsBuilder {
ChannelProviderSettingsBuilder(default())
ChannelProviderSettingsBuilder(ChannelProviderSettings::default())
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/hstreamdb/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#![feature(default_free_fn)]
#![feature(map_first_last)]

pub mod appender;
mod channel_provider;
pub mod client;
Expand Down
5 changes: 2 additions & 3 deletions src/hstreamdb/src/producer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::HashMap;
use std::default::default;
use std::error::Error;
use std::fmt::{Debug, Display};
use std::io::Write;
Expand Down Expand Up @@ -69,7 +68,7 @@ pub struct FlushSettings {

impl FlushSettings {
pub fn builder() -> FlushSettingsBuilder {
default()
FlushSettingsBuilder::default()
}
}

Expand Down Expand Up @@ -241,7 +240,7 @@ impl Producer {
}
Ok(shard_id) => match self.shard_buffer.get_mut(&shard_id) {
None => {
let mut buffer_state: BufferState = default();
let mut buffer_state: BufferState = BufferState::default();
buffer_state.modify(&record);
self.shard_buffer_state.insert(shard_id, buffer_state);
self.shard_buffer.insert(shard_id, vec![record]);
Expand Down