Skip to content

Commit 657129d

Browse files
committed
Fix compilation warnings and errors
1 parent d8b7efd commit 657129d

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Added
99
- Introduced the ability for users to configure lading's sample rate,
1010
configuration option `sample_period_milliseconds` in `lading.yaml`.
11+
- Introduce a `container` generator able to generate an arbitrary number
12+
of docker containers
1113

1214
## [0.25.4]
1315
## Changed

examples/lading-container.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
generator:
22
- container:
3-
repository: ghcr.io/scottopell/randomreader
3+
repository: busybox
44
tag: latest
5-
args: [ "--buffer-size-mb", "10" ]
5+
args:
6+
- sleep
7+
- infinity
68

7-
blackhole:
8-
- http:
9-
binding_addr: "0.0.0.0:8080"
9+
blackhole: []

lading/src/bin/payloadtool.rs

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ fn check_generator(config: &lading::generator::Config) -> Result<(), Error> {
131131
}
132132
lading::generator::Inner::ProcessTree(_) => unimplemented!("ProcessTree not supported"),
133133
lading::generator::Inner::ProcFs(_) => unimplemented!("ProcFs not supported"),
134+
lading::generator::Inner::Container(_) => unimplemented!("Container not supported"),
134135
};
135136

136137
Ok(())

lading/src/generator/container.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use bollard::image::CreateImageOptions;
1616
use bollard::secret::ContainerCreateResponse;
1717
use bollard::Docker;
1818
use serde::{Deserialize, Serialize};
19-
use tokio::pin;
2019
use tokio_stream::StreamExt;
2120
use tracing::{info, warn};
2221
use uuid::Uuid;
@@ -64,8 +63,9 @@ impl Container {
6463
///
6564
/// Will return an error if config parsing fails or runtime setup fails
6665
/// in the future. For now, always succeeds.
66+
#[allow(clippy::needless_pass_by_value)]
6767
pub fn new(
68-
general: General,
68+
_general: General,
6969
config: &Config,
7070
shutdown: lading_signal::Watcher,
7171
) -> Result<Self, Error> {

0 commit comments

Comments
 (0)