Repository: smithy-lang/smithy-rs (language: rust)

Issue:
Regression in 0.57 where default generic for service struct was removed
Prior to 0.57, one could build and return a service from a function like this:

```rust
pub fn build_service() -> PokemonService {
    let service = PokemonService::builder_without_plugins()
        .operation(operation_handler)
        .build()
        .expect("unable to build service");

    service.boxed()
}
```

This is because we had a default generic on the service struct. But since #3095, this no longer compiles, because we accidentally removed that default generic:

![image](https://github.com/smithy-lang/smithy-rs/assets/6341745/8261f2bf-b554-4d4f-a28f-78f051898466)

So even in the most common use case where the user doesn't want to be generic over the body type and was satisfied with `aws_smithy_http_server::body::Body`, they now need to write this function as:

```rust
pub fn build_service() -> PokemonService<
    aws_smithy_http_server::routing::RoutingService<
      aws_smithy_http_server::protocol::rest::router::RestRouter<
        aws_smithy_http_server::routing::Route<aws_smithy_http_server::body::Body>,
      >,
      aws_smithy_http_server::protocol::rest_json_1::RestJson1,
    >,
> {
    let service = PokemonService::builder_without_plugins()
        .operation(operation_handler)
        .build()
        .expect("unable to build service");

    service.boxed()
}
```

This is a regression we didn't catch because we don't have any tests in our suite that initialize the service within a function. We should keep providing a default for the `S` generic for the most common use case.



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml
index f88655c9ba..0113a7eba7 100644
--- a/CHANGELOG.next.toml
+++ b/CHANGELOG.next.toml
@@ -53,61 +53,6 @@ references = ["smithy-rs#3100", "smithy-rs#3114"]
 meta = { "breaking" = true, "tada" = false, "bug" = false }
 author = "ysaito1001"
 
-[[aws-sdk-rust]]
-message = "Fix exclusively setting the credentials provider at operation config-override time. It's now possible to set the credentials when an operation is sent (via `.config_override()`), rather than at client-creation time."
-references = ["smithy-rs#3156", "aws-sdk-rust#901"]
-meta = { "breaking" = false, "tada" = false, "bug" = true }
-author = "ysaito1001"
-
-[[smithy-rs]]
-message = """Enable conversion from `BuildError` into `SdkError` & `<service>::Error`. This allows customers to write the following code:
-```rust
-async fn do_a_thing(client: &Client) -> Result<SdkError<SomeOperationError>> {
-    client.run_operation().complex_field(ComplexField::builder()
-        .a("a")
-        .b("b")
-        .build()?
-    ).send().await?;
-}
-```
-
-Previously, `?` could not be used in this position.
-"""
-references = ["smithy-rs#3173", "smithy-rs#3171"]
-meta = { "breaking" = false, "tada" = true, "bug" = false }
-author = "rcoh"
-
-[[aws-sdk-rust]]
-message = """Enable conversion from `BuildError` into `SdkError` & `<service>::Error`. This allows customers to write the following code:
-```rust
-async fn create_table(dynamo_client: &Client) -> Result<(), SdkError<CreateTableError>> {
-    dynamo_client
-        .create_table()
-        .table_name("test")
-        .key_schema(
-            KeySchemaElement::builder()
-                .attribute_name("year")
-                .key_type(KeyType::Hash)
-                .build()?, // Previously, `?` could not be used here
-        )
-        .send()
-        .await?;
-    Ok(())
-}
-```
-
-Previously, `?` could not be used in this position.
-"""
-references = ["smithy-rs#3173", "smithy-rs#3171"]
-meta = { "breaking" = false, "tada" = true, "bug" = false }
-author = "rcoh"
-
-[[aws-sdk-rust]]
-message = "ProvideCredentials and SharedCredentialsProvider are now re-exported."
-references = ["smithy-rs#3173", "smithy-rs#3155"]
-meta = { "breaking" = false, "tada" = false, "bug" = false }
-author = "rcoh"
-
 [[aws-sdk-rust]]
 message = "The `RequestId` trait has moved from the aws-http crate into aws-types."
 references = ["smithy-rs#3160"]


Test patch: