tonic icon indicating copy to clipboard operation
tonic copied to clipboard

docs: improve comment around cloning middleware in examples

Open shikhar opened this issue 1 year ago • 3 comments

~tower does not seem to use the buffer middleware (anymore?) so the existing comment is invalid~, but the pattern is still sensible given https://docs.rs/tower/latest/tower/trait.Service.html#be-careful-when-cloning-inner-services

shikhar avatar Oct 06 '24 01:10 shikhar

Could you conforms the commit's message to conventional-commits which conventional-changelog bases on, used in this project.

tottoto avatar Oct 07 '24 09:10 tottoto

updated!

shikhar avatar Oct 07 '24 13:10 shikhar

tower does not seem to use the buffer middleware (anymore?) so the existing comment is invalid

I see it is actually used on the client-side, https://github.com/hyperium/tonic/blob/be4e0e772112b7fdd879e95398a7b50d305bad3e/tonic/src/transport/channel/mod.rs#L68

But I think the reference to tower docs is probably more useful.

shikhar avatar Oct 07 '24 13:10 shikhar