Skip to content

Commit

Permalink
Remove unnecessary null-forgiving operator in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrainger committed Jan 15, 2024
1 parent d466ca6 commit 5695248
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/MySqlConnector.Tests/Metrics/IConnectionCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public DataSourceConnectionCreator(bool usePooling, string? poolName, string? ap
m_dataSource = new MySqlDataSourceBuilder(connectionStringBuilder.ConnectionString)
.UseName(poolName)
.Build();
PoolName = poolName ?? applicationName ?? connectionStringBuilder!.GetConnectionString(includePassword: false);
PoolName = poolName ?? applicationName ?? connectionStringBuilder.GetConnectionString(includePassword: false);
}

public MySqlConnection OpenConnection() => m_dataSource!.OpenConnection();
public MySqlConnection OpenConnection() => m_dataSource.OpenConnection();
public string PoolName { get; }
public void Dispose() => m_dataSource!.Dispose();
public void Dispose() => m_dataSource.Dispose();

private readonly MySqlDataSource m_dataSource;
}
Expand Down

0 comments on commit 5695248

Please sign in to comment.