cholcombe973 / block-utils

Rust utilities for working with block devices
MIT License
22 stars 17 forks source link

fmt::Display impl of BlockUtilsError have a infinite recursive loop #17

Closed lumasepa closed 4 years ago

lumasepa commented 4 years ago

First of all, thanks for this lib, has been very useful.

The problem is that fmt::Display impl of BlockUtilsError calls self.to_string() whom implementation is in ToString trait, who depend on Display. So what happens, Display::fmt() calls ToString::to_string() who calls Display::fmt() and so on. This is only triggered if you try to format the error.

cholcombe973 commented 4 years ago

Well that's a terrible bug. Thanks for submitting a fix!