Simplify redundant code

This commit is contained in:
Ian Douglas Scott 2022-07-15 20:21:56 -07:00
parent 5f8a206036
commit 4f9e1cf394

View file

@ -26,7 +26,7 @@ pub fn display_configuration(
.iter()
.flat_map(|conn| device.get_connector(*conn).ok())
{
if let Some(enc) = device.get_connector(conn.handle())?.current_encoder() {
if let Some(enc) = conn.current_encoder() {
if let Some(crtc) = device.get_encoder(enc)?.crtc() {
// If is is connected we found a mapping
if conn.state() == ConnectorState::Connected {