Skip to content

Commit

Permalink
Remove extraneous default() calls
Browse files Browse the repository at this point in the history
Starting with Rust 1.71.0, clippy had added another check that looks for
`default` being called on unit structs. There are a few instances in the
testsys codebase where this happens, so attempting to build with the
latest rust toolchain will fail.

This removes the calls to `default()` since they are not necessary.

Signed-off-by: Sean McGinnis <[email protected]>
  • Loading branch information
stmcginnis committed Sep 19, 2023
1 parent 2491a2a commit 0b953eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ async fn main() {
async fn run(data: BootstrapData) -> AgentResult<()> {
// We specify all of our custom types with this PhantomData struct.
let types = Types {
info_client: PhantomData::<DefaultInfoClient>::default(),
agent_client: PhantomData::<DefaultAgentClient>::default(),
info_client: PhantomData::<DefaultInfoClient>,
agent_client: PhantomData::<DefaultAgentClient>,
};

// We build the agent component and use it to either create or destroy resources.
Expand Down
4 changes: 2 additions & 2 deletions agent/resource-agent/examples/example_resource_agent/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ async fn main() {
async fn run(data: BootstrapData) -> AgentResult<()> {
// We specify all of our custom types with this PhantomData struct.
let types = Types {
info_client: PhantomData::<DefaultInfoClient>::default(),
agent_client: PhantomData::<DefaultAgentClient>::default(),
info_client: PhantomData::<DefaultInfoClient>,
agent_client: PhantomData::<DefaultAgentClient>,
};

// We build the agent component and use it to either create or destroy resources.
Expand Down

0 comments on commit 0b953eb

Please sign in to comment.