Skip to content

[Pubsub] Use the default pool_size value when None is provided #396

@jdrouet

Description

@jdrouet

In the documentation, it's encouraged to do the following

google_cloud_pubsub::client::ClientConfig {
  project_id: Some(String::from("foo")),
  ..Default::default()
}

But when we set the pool_size to None, the client will just try to divide by zero because pool_size is then replaced by zero, instead of the default value (being 4).

google_cloud_pubsub::client::ClientConfig {
  project_id: Some(String::from("foo")),
  pool_size: None,
  ..Default::default()
}

I'd expect the previous provide a client with a pool_size similar to the previous one.
Another way to look at it would be to not make the pool_size optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions